- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have a quickwin applicatioan and deletet all the menue properties. I want to use cntrlc to do an internal command. When I use passdirkeysqq with PASS_DIR_CNTRLC I cannot catch the event. My program ends as it is in a normal application.
I have a quickwin applicatioan and deletet all the menue properties. I want to use cntrlc to do an internal command. When I use passdirkeysqq with PASS_DIR_CNTRLC I cannot catch the event. My program ends as it is in a normal application.
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Most or many system keypresses are not hookable by your program, precisely because they are reserved for system use. The API function RegisterHotKey() can be used to trap system keypresses which then show up as WM_HOTKEY messages in your main message loop.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks for the answer. But in documentation there's written, that this key can be passed. I' ll try your solution.
PS: Do you have an example on how to do this.
PS: Do you have an example on how to do this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I do not use Quickwin, but my understanding is that the point of Quickwin is that you don't have to (or get to) run your program's message loop, so this method may not work with Quickwin. Here is a code sample showing the trapping of various Windows keys:
[bash]! (arbitrary) placeholder values for system hotkey structures INTEGER, PARAMETER :: hk_alttab = 100 INTEGER, PARAMETER :: hk_altesc = 101 ! cause Windows to send a WM_HOTKEY to the main window ! proc so system (ie, non-hookable) hotkeys can be trapped rval = RegisterHotKey (ghwndMain, hk_alttab, MOD_ALT, VK_TAB) rval = RegisterHotKey (ghwndMain, hk_altesc, MOD_ALT, VK_ESCAPE) ! this code would appear in the main Windows message loop proc function ! block further processing of Windows hotkeys CASE (WM_HOTKEY) MainWndProc = 0 ! or whatever you want at this point [/bash]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried to register the contorl-key in combination with the C with an alias. Whenn pressing cntrl c the program finishes at once.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Now it works, I had problems with the deletemenuqq for the exit submenu. I deleted all main-menus including the submenues, then it didn't work. No I delete at first explicitly the exit submenue and then all other menues, then it works.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page