11-22-2007, 04:02 PM
This toolbar changes a global variable when you click the first button. The button is checked when the variable is 1, unchecked when 0.
Then use the variable in a macro. Example:
int hwnd=win("window name" "window class")
int+ g_editorontop
if(g_editorontop)
,ont hwnd
else
,clo hwnd
;/lock {int+ g_editorontop=0}
check :g_editorontop^1; SendMessage id(9999 TriggerWindow) TB_CHECKBUTTON 1 g_editorontop ;;^1 toggles the variable value between 0 and 1. In SendMessage, 1 is 0-based line index of the button in toolbar text.Then use the variable in a macro. Example:
int hwnd=win("window name" "window class")
int+ g_editorontop
if(g_editorontop)
,ont hwnd
else
,clo hwnd
