02-22-2008, 02:33 AM
Hi,
I love the sample dialog with tab control. I would like to modify it so that buttons on a given page will change a display text box. Do you know how I can actively change the text box in an open dialog depending on the user choice of button?
This is how far I have gotten (see below).
Thanks!!!,
Stuart
I love the sample dialog with tab control. I would like to modify it so that buttons on a given page will change a display text box. Do you know how I can actively change the text box in an open dialog depending on the user choice of button?
This is how far I have gotten (see below).
Thanks!!!,
Stuart
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
str controls = "1001 1002 1003 1004 1005 1006"
str b1001Txt1 b1002Txt2Str b1003Txt3 b100Txt4 b1005Txt5 e1006Tes
if(!ShowDialog("TabbedDialog_With_TextBox" &TabbedDialog_With_TextBox &controls)) ret
;BEGIN DIALOG
;0 "" 0x10C80A44 0x100 0 0 387 290 "Form"
;1101 Static 0x44020000 0x4 104 62 48 13 "Page1"
;1201 Static 0x44020000 0x4 110 70 48 13 "Page2"
;1301 Static 0x44020000 0x4 94 60 48 13 "Page3"
;1401 Static 0x44020000 0x4 104 62 48 13 "Page4"
;1501 Static 0x44020000 0x4 110 70 48 13 "Page5"
;1 Button 0x54030001 0x4 142 272 48 14 "OK"
;2 Button 0x54030000 0x4 192 272 48 14 "Cancel"
;4 Button 0x54032000 0x4 242 272 18 14 "?"
;1003 Button 0x54030000 0x0 10 22 48 14 "Text1"
;1001 Button 0x54032000 0x0 10 36 48 14 "Text2"
;1002 Button 0x54032000 0x0 10 52 48 14 "Text3"
;1004 Button 0x54032000 0x0 66 28 58 14 "Text4"
;1005 Button 0x54032000 0x0 72 46 48 14 "Text5"
;1006 Edit 0x54030080 0x200 134 20 240 235 ""
;5 Static 0x54000010 0x20004 4 264 374 1 ""
;3 SysTabControl32 0x54000040 0x0 0 2 382 260 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2020105 "" "0" ""
type TCITEM mask dwState dwStateMask $pszText cchTextMax iImage lParam
ret
;messages
sel message
,case WM_INITDIALOG
,DT_Init(hDlg lParam)
,
,int htb=id(3 hDlg)
,TCITEM ti.mask=WINAPI.TCIF_TEXT
,ti.pszText="1"
,SendMessage htb WINAPI.TCM_INSERTITEMA 0 &ti
,ti.pszText="2"
,SendMessage htb WINAPI.TCM_INSERTITEMA 1 &ti
,ti.pszText="3"
,SendMessage htb WINAPI.TCM_INSERTITEMA 2 &ti
,ti.pszText="4"
,SendMessage htb WINAPI.TCM_INSERTITEMA 3 &ti
,ti.pszText="5"
,SendMessage htb WINAPI.TCM_INSERTITEMA 4 &ti
,
,goto g11
,case WM_DESTROY DT_DeleteData(hDlg)
,case WM_COMMAND goto messages2
,case WM_NOTIFY goto messages3
ret
;messages2
sel wParam
,case IDOK DT_Ok hDlg
,case IDCANCEL DT_Cancel hDlg
ret 1
;messages3
NMHDR* nh=+lParam
sel nh.code
,case WINAPI.TCN_SELCHANGE
,_i=SendMessage(nh.hwndFrom WINAPI.TCM_GETCURSEL 0 0)
,;g11
,DT_Page hDlg _i