Windows Key?

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Windows Key?

Post by Roberto Lopez »

Hi All,

Had someone managed to 'trap' The Windows key to assign it to a specific procedure?

TIA.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Windows Key?

Post by esgici »

Hello Roberto
Roberto Lopez wrote: Had someone managed to 'trap' The Windows key to assign it to a specific procedure?
I hope that this is what you are looking for :?

With my best regards :D
Viva INTERNATIONAL HMG :D
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: Windows Key?

Post by srvet_claudio »

Hi Roberto.

Please,
comment this macro (line 49) in SOURCE\h_windows.prg
#define ALLOW_ONLY_ONE_MESSAGE_LOOP
and re-build HMG.3.1.5

Changelog HMG.3.1.5

Code: Select all

  
      - New Read Keyboard Functions (Contributed by Dr. Claudio Soto)  
      - HMG_GetLastVirtualKeyDown ( [ @hWnd ], [ @nMsg ], [ @wParam ], [ @lParam ] ) --> nVK_Code
      - HMG_GetLastVirtualKeyUp   ( [ @hWnd ], [ @nMsg ], [ @wParam ], [ @lParam ] ) --> nVK_Code
      - HMG_GetLastCharacter      ( [ @hWnd ], [ @nMsg ], [ @wParam ], [ @lParam ] ) --> cCharacter
      - HMG_CleanLastVirtualKeyDown ( [ lCleanAll ] )
      - HMG_CleanLastVirtualKeyUp   ( [ lCleanAll ] )
      - HMG_CleanLastCharacter      ( [ lCleanAll ] )
      - HMG_GetLastVirtualKeyName ( [ lParam ] ) --> cVK_Name
      - HMG_VirtualKeyIsPressed ( VK_Code )
      - GetKeyState ( VK_Code ) --> return nKeyState
      - HMG_SendCharacter ( [ hWnd ], cText )
      - HMG_EnableReadKey()
      - HMG_DisableReadKey()
   - New Handle: Form/Control property (To use in combination with Read Keyboard functions (Contributed by Dr. Claudio Soto)
      - Form.HANDLE           --> equivalent to: GetFormHandle ( cForm )
      - Form.Control.HANDLE   --> equivalent to: GetControlHandle ( cControl, cForm )
      - GetFormNameByHandle    ( hWnd, @cFormName,    @cFormParentName ) --> Return nFormIndex
      - GetControlNameByHandle ( hWnd, @cControlName, @cFormParentName ) --> Return nControlIndex
See this demo: download/file.php?id=3337
Best regards,
Claudio.

PS: The code of the Keyboard Functions is in SOURCE\h_windows.c
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Windows Key?

Post by Roberto Lopez »

esgici wrote:Hello Roberto
Roberto Lopez wrote: Had someone managed to 'trap' The Windows key to assign it to a specific procedure?
I hope that this is what you are looking for :?

With my best regards :D
Thanks!
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Windows Key?

Post by Roberto Lopez »

srvet_claudio wrote:Hi Roberto.

Please,
comment this macro (line 49) in SOURCE\h_windows.prg
#define ALLOW_ONLY_ONE_MESSAGE_LOOP
and re-build HMG.3.1.5
<...>
See this demo: download/file.php?id=3337
Best regards,
Claudio.

PS: The code of the Keyboard Functions is in SOURCE\h_windows.c
Muchas Gracias Claudio!

Saludos,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply