Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
adding the timer dialog into my dialog i already have....
#1
ok i have this in my smart dialog and i want to add timer dialog in there somewhere

Code:
Copy      Help
;\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 223 135 "Quick Macros Help"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 Button 0x54032000 0x0 78 14 48 14 "Move"
;5 Button 0x54032000 0x0 78 34 48 14 "-Log In-"
;6 Button 0x54032000 0x0 78 54 48 14 "-Log Out-"
;7 Button 0x54012003 0x0 78 74 48 12 "Close"
;4 Button 0x54020007 0x0 50 4 108 101 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2010808 "" ""


ret
;messages
if(message=WM_INITDIALOG) DT_Init(hDlg lParam)
;int param=DT_GetParam(hDlg)

sel message
,case WM_INITDIALOG
,ret 1
,case WM_DESTROY DT_DeleteData(hDlg)
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 7
,mac "Close QM Forum"
,case 6
,mac "Quick Macros Forum - Log Out"
,case 5
,mac "Quick Macros Forum - Log In"
,case 3
,mac "Move To Corner"
,case IDOK DT_Ok hDlg
,case IDCANCEL DT_Cancel hDlg
ret 1

and the timer dialog code :

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

str controls = "3"
str e3
if(!ShowDialog("Dialog13" &Dialog13 &controls)) ret

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 220 132 "Form"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 Edit 0x54030080 0x200 6 4 208 13 ""
;4 Button 0x54032000 0x0 6 24 48 14 "Stop"
;END DIALOG
;DIALOG EDITOR: "" 0x2010900 "" ""


ret
;messages
sel message
,case WM_INITDIALOG
,DT_Init hDlg lParam
,SetTimer hDlg 1 1000 0 ;;1 is timer id (you can set many timers), 1000 is timer period in ms
,ret 1
,case WM_TIMER
,if(wParam=1) ;;wParam is timer id
,,str s.time("%#c") ;;or DATE d.getclock; str s.time(d "%#c")
,,s.setwintext(id(3 hDlg))
,case WM_DESTROY DT_DeleteData hDlg
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 4
,KillTimer hDlg 1
,case IDOK
,DT_Ok hDlg
,case IDCANCEL
,DT_Cancel hDlg
ret 1

i want this into my original dialog above
#2
Join 2 dialogs? Open first dialog in dialog editor and add missing controls (those that are in second dialog). Then add missing code. You can copy-paste existing code from second dialog and replace control ids so that they would match ids of newly added controls.
#3
im not quite sure what you mean...
#4
I was not quite sure what means "add timer dialog in there somewhere" and "i want this into my original dialog above". Do you want to show second dialog when you press a button in first dialog? Or add controls and code of second dialog to first dialog? Or ...
#5
no i mean like have the a timer somewhere in this dialog

Code:
Copy      Help
;\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 223 135 "Quick Macros Help"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 Button 0x54032000 0x0 78 14 48 14 "Move"
;5 Button 0x54032000 0x0 78 34 48 14 "-Log In-"
;6 Button 0x54032000 0x0 78 54 48 14 "-Log Out-"
;7 Button 0x54012003 0x0 78 74 48 12 "Close"
;4 Button 0x54020007 0x0 50 4 108 101 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2010808 "" ""


ret
;messages
if(message=WM_INITDIALOG) DT_Init(hDlg lParam)
;int param=DT_GetParam(hDlg)

sel message
,case WM_INITDIALOG
,ret 1
,case WM_DESTROY DT_DeleteData(hDlg)
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 7
,mac "Close QM Forum"
,case 6
,mac "Quick Macros Forum - Log Out"
,case 5
,mac "Quick Macros Forum - Log In"
,case 3
,mac "Move To Corner"
,case IDOK DT_Ok hDlg
,case IDCANCEL DT_Cancel hDlg
ret 1
#6
ken Wrote:no i mean like have the a timer somewhere in this dialog

Code:
Copy      Help
;\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 223 135 "Quick Macros Help"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 Button 0x54032000 0x0 78 14 48 14 "Move"
;5 Button 0x54032000 0x0 78 34 48 14 "-Log In-"
;6 Button 0x54032000 0x0 78 54 48 14 "-Log Out-"
;7 Button 0x54012003 0x0 78 74 48 12 "Close"
;4 Button 0x54020007 0x0 50 4 108 101 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2010808 "" ""


ret
;messages
if(message=WM_INITDIALOG) DT_Init(hDlg lParam)
;int param=DT_GetParam(hDlg)

sel message
,case WM_INITDIALOG
,ret 1
,case WM_DESTROY DT_DeleteData(hDlg)
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 7
,mac "Close QM Forum"
,case 6
,mac "Quick Macros Forum - Log Out"
,case 5
,mac "Quick Macros Forum - Log In"
,case 3
,mac "Move To Corner"
,case IDOK DT_Ok hDlg
,case IDCANCEL DT_Cancel hDlg
ret 1

bro all u need to do is put the codes that arnt in the other 1 without the timer, and make new edit or buttons that are in the second 1 into the first 1 ok. idk how to make it any simpler


Forum Jump:


Users browsing this thread: 1 Guest(s)