BCX_STATUS creates a Status bar at the bottom of the owner window.
Syntax:hStatus = BCX_STATUS(Text AS STRING, _ hwndParent AS HWND _ [, cidStatBar AS INTEGER] _ [, numparts AS INTEGER] _ [, parts AS INTEGER]) Return Value:
Parameters:
|
When a form, which includes a menu, is built, the BCX_STATUS function call must be placed after the menu building procedure calls.
GUI "BCX_STATUS" DIM Form1 AS CONTROL DIM Stat1 AS CONTROL DIM MainMenu AS HMENU DIM HelpMenu 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
If the control was created, the return value is the handle of the new control. If the function fails, the return value is NULL.
For an example of the BCX_STATUS function see Demo.bas.