Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Controlling a multipage dialog
#12
I would like the Nest and Previous buttons to be on the Zero and the One page but not the Two page. I am not sure of the best way to do this. I do not want to take away any of the control of the Nest and Previous buttons and I do not want to do something like hide the buttons for the Two page because sometimes it does not hide. Every time I try to remove the Nest and Previous buttons I get an unwanted response.

Function My_Dialog87
Code:
Copy      Help
\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
,DT_Page(hDlg 0)
,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


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)