Jump to content

heeeeelp! how to use function: PostKeybdMessage


Guest javen

Recommended Posts

Guest javen

BOOL PostKeybdMessage(

HWND hwnd,

UINT VKey,

KEY_STATE_FLAGS KeyStateFlags,

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?

Link to comment
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

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.