docking_20a_20dialogue_20box_20on_20the_20toolbar
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
docking_20a_20dialogue_20box_20on_20the_20toolbar [2018/03/31 13:19] – external edit 127.0.0.1 | docking_20a_20dialogue_20box_20on_20the_20toolbar [2024/01/05 00:22] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 2: | Line 2: | ||
//by Richard Russell, December 2006//\\ \\ **DO NOT USE THE CODE IN THIS ARTICLE, IT HAS BEEN REPORTED THAT IT CAN MAKE YOUR PROGRAM UNSTABLE**\\ \\ A normal dialogue box is free to be moved anywhere on the desktop. This article describes how to ' | //by Richard Russell, December 2006//\\ \\ **DO NOT USE THE CODE IN THIS ARTICLE, IT HAS BEEN REPORTED THAT IT CAN MAKE YOUR PROGRAM UNSTABLE**\\ \\ A normal dialogue box is free to be moved anywhere on the desktop. This article describes how to ' | ||
+ | <code bb4w> | ||
INSTALL @lib$+" | INSTALL @lib$+" | ||
nbutts% = 12 | nbutts% = 12 | ||
Line 8: | Line 9: | ||
buttid%() = 100, | buttid%() = 100, | ||
htoolbar% = FN_createtoolbar(nbutts%, | htoolbar% = FN_createtoolbar(nbutts%, | ||
+ | </ | ||
Here ten separators (indicated by **buttid%** values of 0) are included between two conventional buttons. The dialogue box will eventually be placed in this gap.\\ \\ Step two is to create the dialogue box. Again this is done conventionally, | Here ten separators (indicated by **buttid%** values of 0) are included between two conventional buttons. The dialogue box will eventually be placed in this gap.\\ \\ Step two is to create the dialogue box. Again this is done conventionally, | ||
+ | <code bb4w> | ||
INSTALL @lib$+" | INSTALL @lib$+" | ||
dlg% = FN_newdialog("", | dlg% = FN_newdialog("", | ||
Line 15: | Line 18: | ||
PROC_radiobutton(dlg%, | PROC_radiobutton(dlg%, | ||
PROC_radiobutton(dlg%, | PROC_radiobutton(dlg%, | ||
+ | </ | ||
For the purpose of illustration the dialogue box contains three radiobuttons.\\ \\ Finally the toolbar is given the WS_CLIPCHILDREN and WS_CLIPSIBLINGS styles and the dialogue box is docked to the toolbar:\\ \\ | For the purpose of illustration the dialogue box contains three radiobuttons.\\ \\ Finally the toolbar is given the WS_CLIPCHILDREN and WS_CLIPSIBLINGS styles and the dialogue box is docked to the toolbar:\\ \\ | ||
+ | <code bb4w> | ||
PROC_showdialog(dlg%) | PROC_showdialog(dlg%) | ||
SYS " | SYS " | ||
Line 21: | Line 26: | ||
SYS " | SYS " | ||
SYS " | SYS " | ||
+ | </ | ||
The value in the **SetWindowPos** call (30 in this case) should be adjusted so that the dialogue box is positioned correctly.\\ \\ The only complication, | The value in the **SetWindowPos** call (30 in this case) should be adjusted so that the dialogue box is positioned correctly.\\ \\ The only complication, | ||
+ | <code bb4w> | ||
dlg% = FN_newdialog("", | dlg% = FN_newdialog("", | ||
dlg%!16 = & | dlg%!16 = & | ||
Line 27: | Line 34: | ||
PROC_radiobutton(dlg%, | PROC_radiobutton(dlg%, | ||
PROC_radiobutton(dlg%, | PROC_radiobutton(dlg%, | ||
+ | </ |
docking_20a_20dialogue_20box_20on_20the_20toolbar.1522502357.txt.gz · Last modified: 2024/01/05 00:18 (external edit)