Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog box defines hotkeys
#7
I want to select the current row by double-click, 
I have to add a delay to stay selected, Later, the selection is automatically deselected! Why?  Huh
Line51

Macro Macro9
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog" "4"
;3 Edit 0x54231044 0x200 8 8 208 96 ""
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040C02 "*" "" "" ""

str controls = "3"
str e3
e3=
;Hello world!
;Hello world!

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

#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,SetWindowSubclass(id(3 hDlg) &sub.WndProc_Subclass_Edit 1 0)
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK

,case IDCANCEL
ret 1

#sub WndProc_Subclass_Edit
function# hwnd message wParam lParam uIdSubclass dwRefData
;https://www.quickmacros.com/forum/showthread.php?tid=7241&pid=35624#pid35624

;This function can be used with SetWindowSubclass as window procedure.
;<help>SetWindowSubclass</help> is the recommended way to subclass windows. Easier and safer than SetWindowLong. Example: SetWindowSubclass(hwnd &sub.WndProc_Subclass 1 0)

;OutWinMsg message wParam lParam ;;uncomment to see received messages

sel message
,case WM_MBUTTONDOWN 
,
,case WM_MBUTTONUP
,
,case WM_LBUTTONDBLCLK
,key ESH         ;; End Shift+Home-------------------------------------------------------Todo
,3

int R=DefSubclassProc(hwnd message wParam lParam)

sel message
,case WM_NCDESTROY
,RemoveWindowSubclass(hwnd &sub.WndProc_Subclass_Edit uIdSubclass)
,
,;case ...
ret R


Messages In This Thread
Dialog box defines hotkeys - by Davider - 07-21-2022, 10:35 AM
RE: Dialog box defines hotkeys - by Gintaras - 07-21-2022, 11:16 AM
RE: Dialog box defines hotkeys - by Davider - 07-21-2022, 11:23 AM
RE: Dialog box defines hotkeys - by Davider - 08-05-2022, 08:01 AM
RE: Dialog box defines hotkeys - by Gintaras - 08-05-2022, 05:06 PM
RE: Dialog box defines hotkeys - by Davider - 08-05-2022, 06:58 PM
RE: Dialog box defines hotkeys - by Davider - 09-05-2022, 04:58 AM
RE: Dialog box defines hotkeys - by Gintaras - 09-05-2022, 05:27 AM
RE: Dialog box defines hotkeys - by Davider - 09-05-2022, 10:47 AM
RE: Dialog box defines hotkeys - by Gintaras - 09-05-2022, 11:48 AM
RE: Dialog box defines hotkeys - by Davider - 09-05-2022, 10:11 PM

Forum Jump:


Users browsing this thread: 7 Guest(s)