The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to define a single hotkey in a dialog box
#1
I define a hotkey for the dialog, but it requires at least two keys, for example ctrl+F1, I want to use one hotkey(F1), I did not find the example in the help, I hope someone can remind me, thanks in advanceSmile

Macro Macro5
Code:
Copy      Help
\Dialog_Editor

str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2030506 "*" "" "" ""

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


#sub DlgProc
function# hDlg message wParam lParam
__RegisterHotKey- t_hk1
sel message
,case WM_INITDIALOG
,t_hk1.Register(hDlg 1 MOD_CONTROL VK_F1) ;;Ctrl+F1
,
,case WM_HOTKEY
,sel wParam
,,case 1 mes "Ctrl+F1"
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1


Messages In This Thread
How to define a single hotkey in a dialog box - by win - 04-28-2018, 01:18 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)