BCX_STATUS function
Purpose: BCX_STATUS creates a Status bar at the bottom of the owner window.
Syntax: hStatus = BCX_STATUS(Text$, _ hWndParent _ [, cidStatBar] _ [, numparts%, parts]) Parameters:
|
Remarks: When a form which includes a menu is built, the BCX_STATUS function call must be placed after the menu building procedure calls.
Example:
GUI "BCX_STATUS" DIM Form1 AS CONTROL DIM Stat1 AS CONTROL DIM MainMenu AS HMENU SUB FORMLOAD Form1 = BCX_FORM("Simple Status Sample") MainMenu = CreateMenu() Insertmenu(MainMenu, 0, MF_POPUP, HelpMenu, "&Help") SetMenu(Form1, MainMenu) Stat1 = BCX_STATUS("Ready",Form1) CENTER(Form1) SHOW(Form1) END SUB BEGIN EVENTS SELECT CASE CBMSG CASE WM_LBUTTONDOWN SetWindowText(Stat1,"left mouse button down :-(") CASE WM_LBUTTONUP SetWindowText(Stat1,"LEFT MOUSE BUTTON UP :-)") CASE WM_MOUSEMOVE ' horizontal position of cursor, X Position = LOWORD(lParam) ' vertical position of cursor, Y Position = HIWORD(lParam) SetWindowText(Stat1, STR$(LOWORD(lParam)) & " " & STR$(HIWORD(lParam))) END SELECT END EVENTS
Result: If the control was created, the return value is the handle to the new control. If the function fails, the return value is NULL.
For an example of the BCX_STATUS function see Demo.bas in the BCX\Gui_Demo\EZ_Gui folder.