The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: Bieb on April 18, 2005, 01:18:07 AM

Title: Hotkeys
Post by: Bieb on April 18, 2005, 01:18:07 AM
How does one go about setting up a hotkey, so that your application can be brought up without having to click on a tray icon or window?
Title: Re: Hotkeys
Post by: Vortex on April 18, 2005, 08:02:28 AM
Properties->Shortcut->Shortcut key
Title: Re: Hotkeys
Post by: Bieb on April 18, 2005, 05:40:40 PM
Sorry.  What I meant was how do I make an application that has hotkeys?
Title: Re: Hotkeys
Post by: thomasantony on April 19, 2005, 05:29:04 AM
Hi,
  Seems you have to create some control with "msctls_hotkey32" as the classname. See this

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/hotkey/hotkey.asp

Thomas :U
Title: Re: Hotkeys
Post by: Ramon Sala on April 19, 2005, 05:36:45 PM
Hi Robert,

Easy Code has the HotKey object.

Ramon
Title: Re: Hotkeys
Post by: P1 on April 20, 2005, 01:32:53 PM
When you generate a .lnk to a program file, you can also assign a shortcut key sequence as well.   This is also re-assignable by the user, just in case it conflict with something else.

Regards,  P1  :8)
Title: Re: Hotkeys
Post by: AeroASM on April 22, 2005, 08:40:09 PM
P1: see Bieb's reply to Vortex

thomas: no need for a control

Ramon: nice solution, but I personally don't like Easy Code

My solution: use RegisterhotKey and put a WM_HOTKEY handler in your WndProc.
Title: Re: Hotkeys
Post by: P1 on April 25, 2005, 07:07:51 PM
Quote from: AeroASM on April 22, 2005, 08:40:09 PM
P1: see Bieb's reply to Vortex
It was not so much as technique to as a comment about the technique, that it could be re-assigned by the user.  Having some control passed to the user is useful.

Regards,  P1  :8)