Hi MrBCX:
In this
$BCXVERSION "7.1.8"
GLOBAL hEdit1 AS HWND
GLOBAL hButton1 AS HWND
GLOBAL hButton2 AS HWND
GLOBAL hStatic1 AS HWND
FUNCTION WINMAIN()
FUNCTION = BCX_MDIALOG((DLGPROC)InputBox,"InputBox App", _
0, 157, 76, 146, 61, 0, 0, "TAHOMA", 16)
END FUNCTION
BEGIN MODAL DIALOG AS InputBox
LOCAL Txt$
SELECT CASE Msg
CASE WM_INITDIALOG
hEdit1 = BCX_EDIT("BCX is cool!", hWnd, 101, 3, 6, 69, 30)
hButton1 = BCX_BUTTON("Okay", hWnd, 102, 4, 43, 40, 14)
hButton2 = BCX_BUTTON("Cancel", hWnd, 104, 100, 43, 40, 14)
hStatic1 = BCX_LABEL(" ", hWnd, 103, 78, 6, 64, 30)
BCX_SET_FONT(hStatic1, "TAHOMA", 12) 'for comparison
CENTER(hWnd)
CASE WM_COMMAND
IF CBCTLMSG = BN_CLICKED THEN
IF CBCTL = 102 THEN 'clicked the okay button
Txt$ = BCX_GET_TEXT$(hEdit1)
BCX_SET_TEXT(hStatic1, Txt$)
END IF
IF CBCTL = 104 THEN 'clicked the cancel button
CLOSEDIALOG
END IF
END IF
END SELECT
END DIALOG
this
FUNCTION WINMAIN()
FUNCTION = BCX_MDIALOG((DLGPROC)InputBox(D[code],"InputBox App", _
0, 157, 76, 146, 61, 0, 0, "TAHOMA", 16)
END FUNCTION
is translated to this
int WINAPI WinMain (HINSTANCE hInst,HINSTANCE hPrev,LPSTR CmdLine,int CmdShow)
{
BCX_hInstance = hInst;
return BCX_MDialog ((DLGPROC)(DLGPROC)(DLGPROC)InputBox,"InputBox App",0,157,76,146,61,0,0,"TAHOMA",16);
}