Jump to content


Photo

heeeeelp! how to use function: PostKeybdMessage

- - - - -

  • Please log in to reply
1 reply to this topic

#1
javen

javen

    Newbie

  • Members
  • Pip
  • 5 posts
  • Devices:mio 8390
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?

  • 0

#2
muff

muff

    Addict

  • MoDaCo Gold
  • PipPipPipPipPip
  • 938 posts
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

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users