BCX_INPUT creates a single line edit text box.
Syntax:hCtl = BCX_INPUT(Text AS STRING, _ hwndParent AS HWND, _ hCtlID AS INTEGER, _ Xpos AS INTEGER, _ Ypos AS INTEGER, _ Width AS INTEGER, _ Height AS INTEGER _ [, WinStyle AS INTEGER] _ [, ExWinStyle AS INTEGER]) Return Value:
Parameters:
|
The default window Style for a BCX_INPUT control also can be changed by using the MODSTYLE function.
GUI "BCX_INPUT", PIXELS GLOBAL Form1 AS HWND GLOBAL Inpbox1 AS HWND GLOBAL Inpbox2 AS HWND GLOBAL Message$ AS STRING SUB FORMLOAD Form1 = BCX_FORM("BCX_INPUT", 0, 0, 250, 120) Inpbox1 = BCX_INPUT("Move cursor here then press Enter", Form1, 998, 20, 20, 200, 20) Inpbox2 = BCX_INPUT("Or move cursor here then press Enter", Form1, 999, 20, 50, 200, 20) CENTER(Form1) SHOW(Form1) END SUB BEGIN EVENTS SELECT CASE CBMSG CASE WM_COMMAND IF wParam = 1 AND lParam = 0 THEN 'If cursor has been moved to Inpbox1 and keyboard Enter pressed. IF GetFocus() = Inpbox1 THEN Message$ = BCX_GET_TEXT$(Inpbox1) MSGBOX "BCX_INPUT_1 has contents: " & Message$ END IF 'If cursor has been moved to Inpbox2 and keyboard Enter pressed. IF GetFocus() = Inpbox2 THEN Message$ = BCX_GET_TEXT$(Inpbox2) MSGBOX "BCX_INPUT_2 has contents: " & Message$ END IF END IF END SELECT END EVENTS
For another example of the BCX_INPUT function see Amort.bas in the BCX\Gui_Demo\Amort directory.