Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Menu/Toolbar dlg in exe
#15
Thanks for your help, the effect is great, but the hotkeys in the menu are not available. Huh

When I click on the menu and then press the hotkey is in effect, in addition, I found a problem, use the hotkey ctrl+p to exit Notepad, the menu will delay for a few seconds to disappear

Is there a way to make the hotkeys Directly effective in the notpad?

I have an idea,

When I press ctrl, the menu will be activated. Then, when I press ctrl+p, the hotkey in the menu will take effect. Idea

If these functions can be implemented, I think that almost all functions of QM, such as toolbars, menus, context menus, hotkeys, and AutoText, can be used after generating exe files. I hope developers can continue to improve it.  Tongue


Macro Macro3
Code:
Copy      Help
CloseWindowsOf("DlgMenu" "#32770");err
int w
run "$system$\notepad.exe" "" "" "" 0x1800 win("" "Notepad") w

str md=
;BEGIN MENU
;>&File
;,&Open :501 0x0 0x0 Co
;,&Save :502 0x0 0x0 Cs
;,>Submenu
;,,Item1 :551
;,,Item2 :552
;,,<
;,-
;,E&xit :555 0x0 0x0 Cp
;,<
;>&Edit
;,Cu&t :601
;,&Copy :602
;,&Paste :603
;,<
;>&Help
;,&About :901
;,<
;END MENU

str dd=
;BEGIN DIALOG
;0 "" 0x80000840 0x90 0 0 385 11 "DlgMenu"
;END DIALOG
;DIALOG EDITOR: "" 0x2030502 "*" "" "" ""

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

#sub DlgProc v
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,__GdiHandle-- hb=CreateSolidBrush(0xff00)
,Transparent hDlg 255 0xff00
,SetWindowLong hDlg GWL_HWNDPARENT w
,SetTimer hDlg 1 100 0
,;SendMessage hDlg WM_COMMAND 5 0 ;;execute gButton code. Or use function instead.
,SendMessage hDlg WM_TIMER 1 0 ;;execute gTimer code. Or use function instead.
,hid- hDlg
,case WM_TIMER
,sel wParam
,,case 1 goto gTimer
,case WM_DESTROY
,case WM_CTLCOLORDLG ret hb
,case WM_COMMAND goto messages2
,
ret
;messages2
sel wParam
,case 501
,out "Open"
,case IDCANCEL
,out "Exit"
,case 555 ;;E&xit
,int w1=win("" "Notepad")
,clo w1
act w; err
ret 1

;gTimer
Zorder hDlg HWND_TOP SWP_NOACTIVATE
int x_NotePad y_NotePad cx_NotePad cy_NotePad;
if !IsWindow(w)
,CloseWindowsOf("DlgMenu" "#32770");err
,ret
GetWinXY w x_NotePad y_NotePad cx_NotePad cy_NotePad
int x_Dlg y_Dlg cx_Dlg cy_Dlg
GetWinXY hDlg x_Dlg y_Dlg cx_Dlg cy_Dlg
MoveWindow hDlg x_NotePad+150 y_NotePad+3 cx_NotePad-300 cy_Dlg  1;;need to leave enough room for max/min/close app dlg frame buttons and enough of frame to grab for moving/resizing


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)