Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with sending a key to an Editor

Status
Not open for further replies.

Leonardozwei

Programmer
Jun 24, 2002
15
I want to send a Text to an editor i.e. Notepad.
I post them an WM_KEYDOWN message with the Keycode I got from the function VkKeyCode(char), but all chars are convertet to lowercase.

Can anyone tell me why?
 
Yes, all characters are represented in lowercase - you'll have to explicity press the SHIFT key for uppercase.

// presses the shift key
keybd_event(VK_SHIFT, MapVirtualKey(VK_SHIFT,0),0,0);

// your code goes here

// releases the shift key
keybd_event(VK_SHIFT, MapVirtualKey(VK_SHIFT,0), KEYEVENTF_KEYUP,0);

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top