Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1843
  • Last Modified:

PostMessage with WM_KEYDOWN

I have a problem when trying to send a upper letter by PostMessage with WM_KEYDOWN.
Please help me.
0
hahahahahaha
Asked:
hahahahahaha
1 Solution
 
AxterCommented:
Hi hahahahahaha,

Exactly what is the problem.
Please post a full description of the problem, and what is your desired results.

David Maisonave :-)
Cheers!
0
 
hahahahahahaAuthor Commented:
Yes, my problem simply likes that: I write a keyboard hook, for example when user press Enter, i want to write  a message : "HEllo World"(upper and lower letters)  by PostMessage with WM_KEYDOWN.
Do you understand my problem? It is urgent , please help me!
0
 
Jaime OlivaresSoftware ArchitectCommented:
Hi, have a look to this article:
http://www.codeproject.com/dialog/keystroke.asp
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
AxterCommented:
>>I write a keyboard hook, for example when user press Enter

Please post your code.
0
 
hahahahahahaAuthor Commented:
For example:
void SendChar(HWND hwnd,char c)
{
  if(isupper(c))
  {
       PostMessage(hwnd,WM_KEYDOWN,VK_SHIFT,0);
       PostMessage(hwnd,WM_KEYDOWN,VkKeyScan(c),0);
  }
 else
     PostMessage(hwnd,WM_KEYDOWN,VkKeyScan(c),,0);

}

It's OK when Caplock is off.I try to solve the problem with Caplock being on.Please help me.
0
 
AxterCommented:
>>PostMessage(hwnd,WM_KEYDOWN,VkKeyScan(c),,0);

That has one too many commas.
0
 
zaerazerCommented:
Hi,

Try keybd_event instead.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now