============================================================================
Blackbox for Windows: "Useful functions and messages"
Copyright  2001-2003 The Blackbox for Windows Development Team
============================================================================

	###### Additional information can be found in BBApi.h!!! ######

============================================================================

HWND hwndBlackbox = GetBBWnd();

// Instead of calling GetBBWnd() all the time it might be wise
// to cache it somewhere if you're going to use it a lot...

============================================================================
// Shutdown

SendMessage(GetBBWnd(), BB_SHUTDOWN, 0, 0);     // Shutdown
SendMessage(GetBBWnd(), BB_SHUTDOWN, 1, 0);     // Reboot
SendMessage(GetBBWnd(), BB_SHUTDOWN, 2, 0);     // Logoff
SendMessage(GetBBWnd(), BB_SHUTDOWN, 3, 0);     // Hibernate
SendMessage(GetBBWnd(), BB_SHUTDOWN, 4, 0);     // Suspend
SendMessage(GetBBWnd(), BB_SHUTDOWN, 5, 0);     // LockWorkstation

SendMessage(GetBBWnd(), BB_QUIT, 0, 0);         // Quit Blackbox
SendMessage(GetBBWnd(), BB_RESTART, 0, 0);      // Restart Blackbox
SendMessage(GetBBWnd(), BB_RECONFIGURE, 0, 0);  // Reconfigure Blackbox

SendMessage(GetBBWnd(), BB_RUN, 0, 0);          // Opens up the run dialog

============================================================================
// Change style

char style_name[] = "style";
SendMessage(GetBBWnd(), BB_SETSTYLE, 0, (LPARAM)style_name);

============================================================================
// Toggle the system tray + taskbar shown/hidden
SendMessage(GetBBWnd(), BB_TOGGLETRAY, 0, 0);

// Set the temporary toolbar display
SendMessage(GetBBWnd(), BB_SETTOOLBARLABEL, 0, (LPARAM)"message");

// Toggle plugins shown/hidden
SendMessage(GetBBWnd(), BB_TOGGLEPLUGINS, 0, 0);

============================================================================
// Broadcast messages

char my_broam[] = "@myBroam";
SendMessage(GetBBWnd(), BB_BROADCAST, 0, (LPARAM)my_broam);

============================================================================
SendMessage(GetBBWnd(), BB_WORKSPACE, 0, 0); // DeskLeft (move vwm left)
SendMessage(GetBBWnd(), BB_WORKSPACE, 1, 0); // DeskRight (move vwm right)
SendMessage(GetBBWnd(), BB_WORKSPACE, 2, 0); // AddDesk (add new desktop)
SendMessage(GetBBWnd(), BB_WORKSPACE, 3, 0); // DelDesk (remove last desktop)

int desktop_number = 0;
SendMessage(GetBBWnd(), BB_WORKSPACE, 4, (LPARAM)desktop_number); // DeskSwitchToN (switch to desktop; starts at 0!)
SendMessage(GetBBWnd(), BB_WORKSPACE, 5, 0); // GatherWindows (gather all windows on first workspace)

SendMessage(GetBBWnd(), BB_WORKSPACE, 6, 0); // MoveWindowLeft (ie. to the previous workspace)
SendMessage(GetBBWnd(), BB_WORKSPACE, 7, 0); // MoveWindowRight (ie. to the next workspace)

============================================================================

SendMessage(GetBBWnd(), BB_WINDOWSHADE, (WPARAM)hwnd, 0); // Shade specified window
SendMessage(GetBBWnd(), BB_WINDOWLOWER, (WPARAM)hwnd, 0); // Send window to bottom of z-order
SendMessage(GetBBWnd(), BB_WINDOWGROWHEIGHT,(WPARAM)hwnd, 0); // Grow window to max height
SendMessage(GetBBWnd(), BB_WINDOWGROWWIDTH, (WPARAM)hwnd, 0); // Grow window to max width

============================================================================
