09-13-2008, 05:24 PM
Can someone tell me why the information for the 3rd page appears on the 1st page when you start the macro and then after you press next everything is corrected?
Function My_Dialog87
Function My_Dialog87
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
str controls = "5 6 1208"
str o5Pre o6Nex e1208
if(!ShowDialog("My_Dialog87" &My_Dialog87 &controls)) ret
;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 265 163 "Dialog"
;1001 Static 0x54020000 0x4 106 4 48 13 "Page0"
;1101 Static 0x44020000 0x4 106 4 48 13 "Page1"
;1201 Static 0x44020000 0x4 106 4 48 13 "Page2"
;1 Button 0x54030001 0x4 12 144 48 14 "OK"
;2 Button 0x54030000 0x4 192 146 48 14 "Cancel"
;4 Button 0x54032000 0x4 242 146 18 14 "?"
;5 Button 0x54033004 0x4 68 146 56 14 "< Previous"
;6 Button 0x54003004 0x4 128 146 56 14 "Next >"
;1208 Edit 0x54030080 0x200 16 64 96 14 ""
;1209 Static 0x54000000 0x0 24 88 48 12 "Text"
;END DIALOG
;DIALOG EDITOR: "" 0x2030001 "" "0" ""
ret
;messages
sel message
,case WM_INITDIALOG
,EnableWindow(id(5 hDlg)0)
,int-- t; t = 0
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 6
,EnableWindow(id(5 hDlg)1)
,t+1
,if(t = 2)
,,EnableWindow(id(6 hDlg)0)
,DT_Page(hDlg t)
,
,case 5
,EnableWindow(id(6 hDlg)1)
,t-1
,if(t = 0)
,,EnableWindow(id(5 hDlg)0)
,DT_Page(hDlg t)
,case IDOK
,case IDCANCEL
ret 1