Jose's Read Only Forum 2023

General Category => General Discussion => Topic started by: Edwin Knoppert on December 30, 2010, 11:56:25 AM

Title: Testing for 'keypress'
Post by: Edwin Knoppert on December 30, 2010, 11:56:25 AM
I have a situation where i use WM_GETDLGCODE > WM_KEYDOWN to do some action.
Unf. it also reacts on page down and such.
There is no WM_KEYPRESS during this message and usually this message provides a more limitted set of charcodes.

What can i do best to determine the desired keys, i guess pagedown and shift etc are system keys and are unwanted keys to invoke a feature in my code.
Simply making a list for acceptance is not really desired.
For example distincting 5 and shift+5 is harder.

The keys should apply similar to a textbox.

A function like CharToOem() and such, i have no idea what it means and if it's useful.
?

PS, let's focus on this message since even if i may be able to use a WM_CHAR or similar i have more examples where the WM_GETDLGCODE applies.
Title: Re: Testing for 'keypress'
Post by: Edwin Knoppert on December 30, 2010, 12:05:28 PM
To be clear, shift+1 does not give me the charcode for ! but 1 and the shift systemkey.
There must be some translation for this and a way to skip a page down and functionkeys etc..