checkbox on a toolbar and sets its text (the PBpad sample used here)
Actions are received in %WM_COMMAND, when LOWRD(wParam) = %IDOPT1
It can also be used for other controls, like combo lists, etc.
(see win32.hlp and "CreateWindow" for more info..

x = left position on toolbar.
y = top position on toolbar.
w = width
h = height
hToolbar = the toolbar's hWnd
hWndOpt = the control's hWnd
%IDOPT1 = (Id num, whatever you like, 300, 400, etc)
Code:
hWndOpt = CreateWindowEx(0, "BUTTON", BYVAL %NULL, _ %WS_CHILD OR %BS_AUTORADIOBUTTON OR %WS_VISIBLE, _ x, y, w, h, hToolbar, %IDOPT1, hInst, BYVAL %Null) zText = "Option 1" SendMessage hWndOpt, %WM_SETTEXT, 0, VARPTR(zText)
check state are automatically set to checked for the selected one and
unchecked for all other %BS_AUTORADIOBUTTON controls on the toolbar.
------------------
[This message has been edited by Borje Hagsten (edited February 18, 2000).]
Leave a comment: