Jump to content
Sign in to follow this  

heeeeelp! how to use function: PostKeybdMessage

Recommended Posts

BOOL PostKeybdMessage(

HWND hwnd,



UINT cCharacters,

UINT* pShiftStateBuffer,

UINT* pCharacterBuffer


what's meaning the param KEY_STATE_FLAGS ?

I type the "KeyShiftAnyShiftFlag" in eVC4, but ERROR:"C2065: 'KeyShiftAnyShiftFlag' : undeclared identifier"

and error: "'KEY_STATE_FLAGS' : undeclared identifier"

how value its?

Share this post

Link to post
Share on other sites

the function is for sending fake keypresses to a window

the KeyStateFlags is explained in the help files - basically this is to modify the keycode to say wether say the shift key is also down, or a ctrl key, or wether that key is coming up or going down

you are letting the window know everything about the current key message you are faking

to make sure that it compiles correctly, again as covered in the help files, make sure you are including "Winuser.h"

hope that helps

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this