03-21-2008, 12:56 PM
i have a dialog that i've jacked up some how. I took off the OK and CANCEL buttons but now i want to put the CANCEL button back on (only because Alt-F4 and the Red "X" at the top right don't close the dialog). why won't Alt-F4 and the Red "X" at the top right don't close the dialog? and what am i doing wrong here that i cant seem to add a Cancel button?
any help would be appriciated.
any help would be appriciated.
;\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
str flnName
;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 242 116 "Scratch Pad"
;3 Edit 0x540F14C4 0x101 3 44 236 70 ""
;4 Button 0x5C032000 0x0 8 4 48 14 "&Save"
;2 Button 0x5C030000 0x0 66 4 68 14 "Save and &Close"
;5 Edit 0x54070000 0x101 3 26 236 14 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2020105 "" "" ""
ret
;messages
sel message
,case WM_DESTROY
,case WM_COMMAND goto messages2
,case WM_SIZE
,;RECT r; GetClientRect hDlg &r
,;MoveWindow id(3 hDlg) 5 69 r.right-10 r.bottom-75 1
,;MoveWindow id(5 hDlg) 5 42 r.right-10 23 1
ret
;messages2
sel wParam
,case 6
,,;clo win("Scratch Pad" "#32770" "qm")
,,ret 1
,case EN_CHANGE<<16|3
,,EnableWindow id(4 "Scratch Pad") 1
,,EnableWindow id(2 "Scratch Pad") 1
,case EN_SETFOCUS<<16|3
,,0.05
,,'CH
,,mov -401 792 win("Scratch Pad" "#32770" "")
,case 4
,,flnName.getwintext(id(5 "Scratch Pad"))
,,_s.getwintext(id(3 "Scratch Pad"))
,,_s.setfile(flnName)
,,EnableWindow id(4 "Scratch Pad") 0
,,EnableWindow id(2 "Scratch Pad") 0
,,bee "C:\downloads\sounds\st sounds\comp clicks etc\b\c810.wav"
,case 2
,,flnName.getwintext(id(5 "Scratch Pad"))
,,_s.getwintext(id(3 "Scratch Pad"))
,,_s.setfile(flnName)
,,ret 1
,;case IDOK
,case IDCANCEL
ret 1