Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multipage Dialog and page triggering
#1
I have tried but not been terribly successful, and could definitely use some guidance at this point.

Basically, I need to get a multipage dialog to advance a page upon a user action (hitting OK for instance) AND also be able to have the dialog be able to advance a page based upon a returned value from some action (file copied successfully, file exists, getfile etc.). The pages will always advance (never return/go backwards), tho it'd be useful to possibly skip the next page depending upon return value. Can this be done using a single multipage dialog?

If at all possible, can you give an example of a basic three page dialog like the following:


Page 1 (just has an OK button).
Upon hitting OK, initiates a simple task or two (file copied successfully, file exists, getfile etc.) and also advances to...
Page 2 (displays the word ""Processing" static text)
Upon completion of the copying/enumeration etc. task displays...
Page 3 (displays "Process Complete" static text)

If you can get me over this hump it would be most appreciated.

Thanks!

Steve
#2
Function Dialog36
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

if(!ShowDialog("Dialog36" &Dialog36)) ret

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 265 163 "Dialog"
;1001 Static 0x54020000 0x4 106 4 126 13 "Page0"
;1101 Static 0x44020000 0x4 106 4 110 13 "Page1 (processing)"
;1201 Static 0x44020000 0x4 106 4 100 13 "Page2 (complete)"
;2 Button 0x54030000 0x4 192 146 48 14 "Cancel"
;4 Button 0x54032000 0x4 242 146 18 14 "?"
;3 Button 0x54032000 0x0 140 146 48 14 "Next"
;5 Static 0x54000010 0x20004 4 138 256 1 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2020100 "" "2 "


ret
;messages
int-- page
sel message
,case WM_INITDIALOG
,page=0
,DT_Page hDlg page
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 3 ;;Next
,;g1
,;do something before changing page
,sel page
,,case 0
,,case 1
,,case 2
,,DT_Ok hDlg
,,ret
,;open next page
,page+1
,DT_Page hDlg page
,;do something after changing page
,sel page
,,case 1
,,mes "processing"
,,goto g1
,,case 2
,case IDCANCEL
ret 1
#3
Forgot to thank you for this:

Thank You! Got me much farther down the road of QM understanding...

Steve


Forum Jump:


Users browsing this thread: 1 Guest(s)