Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How does a button implement two functions
#1
Hello everyone, I created a dialog box without a title bar. I want to use the button in the upper right corner of the dialog to implement two functions. Any comments and suggestions are welcome. Thanks in advance.  Smile

1. When I click the button, I can close the dialog

2. When I right-drag the button(or left-drag the button ), I can drag the entire dialog

Macro Macro6
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90080AC8 0x0 0 0 398 210 "Dialog"
;3 Button 0x54032000 0x0 368 0 30 14 "Close"
;END DIALOG
;DIALOG EDITOR: "" 0x2040700 "*" "" "" ""

if(!ShowDialog(dd &sub.DlgProc 0)) ret


#sub DlgProc
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


Messages In This Thread
How does a button implement two functions - by win - 06-08-2018, 04:35 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)