Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom control event
#1
the controls in the dialog box, some events are not available, can I customize? How to achieve Huh

E.g,
Right click on the button to pop up a message box
Right click on the item in the combo box to pop a message box

Any suggestions are welcome, I hope someone can provide an example, thanks in advance



Function Macro2
Code:
Copy      Help
[size=large]str s=
;one
;two
;three
;four

str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 Button 0x54032000 0x0 116 52 100 14 "Right click on the popup"
;4 ComboBox 0x54230641 0x0 8 8 96 120 ""
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040801 "*" "" "" ""

str controls = "4"
str cb4
cb4=s
if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc v
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1[/size]


Forum Jump:


Users browsing this thread: 1 Guest(s)