10-05-2013, 11:05 AM
I have a very simple dialogbox with an inputfield and button.
When the inputfield loses focus and if it is empty, it changes the static text above the inputfield to "empty"
I also have a button called "suppress", I want to keep the static text unchanged when the button "suppress" is pressed.
(the case N_KILLFOCUS<<16|3 must not be executed.)
DIALOG:
Function suppress
FUNCTION
Function suppress_error_check
When the inputfield loses focus and if it is empty, it changes the static text above the inputfield to "empty"
I also have a button called "suppress", I want to keep the static text unchanged when the button "suppress" is pressed.
(the case N_KILLFOCUS<<16|3 must not be executed.)
DIALOG:
Function suppress
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
str controls = "3"
str e3
if(!ShowDialog("suppress" &suppress &controls)) ret
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 170 74 "Dialog"
;3 Edit 0x54030080 0x200 8 44 96 14 ""
;4 Button 0x54032000 0x0 118 44 48 14 "suppress"
;5 Static 0x54000000 0x0 8 30 48 10 "Inputfield 1:"
;END DIALOG
;DIALOG EDITOR: "" 0x2030604 "" "" "" ""
ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case EN_KILLFOCUS<<16|3
,,suppress_error_check(hDlg)
,case 4
,,out
,,out "Button pressed, static text above input field NOT changed"
,case IDOK
,case IDCANCEL
ret 1
FUNCTION
Function suppress_error_check