Click here to Skip to main content
15,920,896 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Visual C++ .NET troubles Pin
Anders Molin22-Jul-03 14:51
professionalAnders Molin22-Jul-03 14:51 
GeneralRe: Visual C++ .NET troubles Pin
User 665823-Jul-03 1:15
User 665823-Jul-03 1:15 
GeneralRe: Visual C++ .NET troubles Pin
Michael Dunn22-Jul-03 15:19
sitebuilderMichael Dunn22-Jul-03 15:19 
GeneralRe: Visual C++ .NET troubles Pin
User 665823-Jul-03 1:17
User 665823-Jul-03 1:17 
GeneralGetting the edit window that currently has focus Pin
Kuniva22-Jul-03 13:47
Kuniva22-Jul-03 13:47 
GeneralRe: Getting the edit window that currently has focus Pin
Ryan Binns22-Jul-03 17:32
Ryan Binns22-Jul-03 17:32 
GeneralRe: Getting the edit window that currently has focus Pin
Kuniva23-Jul-03 0:53
Kuniva23-Jul-03 0:53 
GeneralRe: Getting the edit window that currently has focus Pin
Ryan Binns23-Jul-03 4:27
Ryan Binns23-Jul-03 4:27 
Kuniva wrote:
I thought if u specify a char like that it gives the value from 0 to 255 and its the right ASCII code??

No. keybd_event() takes the virtual-key code of the key. On a keyboard, the lower-case and upper-case letters are produced with the same key. To produce an upper-case key, you have to simulate the shift key being pressed as well. Similarly for an exclamation mark (shift-1). Also, you'll need to simulate the keys being released as well as pressed. You'll have to do something like this:
keybd_event(VK_SHIFT, 0, 0);               // Press the shift key
keybd_event('H', 0, 0);                    // Press the 'H' key
keybd_event('H', 0, KEYEVENTF_KEYUP);      // Release the 'H' key
keybd_event(VK_SHIFT, 0, KEYEVENTF_KEYUP); // Release the shift key
keybd_event('E', 0, 0);                    // Press the 'E' key
keybd_event('E', 0, KEYEVENTF_KEYUP);      // Release the 'E' key
keybd_event('L', 0, 0);                    // Press the 'L' key
keybd_event('L', 0, KEYEVENTF_KEYUP);      // Release the 'L' key
keybd_event('L', 0, 0);                    // Press the 'L' key
keybd_event('L', 0, KEYEVENTF_KEYUP);      // Release the 'L' key
keybd_event('O', 0, 0);                    // Press the 'O' key
keybd_event('O', 0, KEYEVENTF_KEYUP);      // Release the 'O' key
keybd_event(VK_SHIFT, 0, 0);               // Press the shift key
keybd_event('1', 0, 0);                    // Press the '1' key
keybd_event('1', 0, KEYEVENTF_KEYUP);      // Release the '1' key
keybd_event(VK_SHIFT, 0, KEYEVENTF_KEYUP); // Release the shift key
Hope this helps,

Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

GeneralCTreeView and derived classes Pin
adonisv22-Jul-03 11:58
adonisv22-Jul-03 11:58 
GeneralRe: CTreeView and derived classes Pin
Tom Archer22-Jul-03 13:18
Tom Archer22-Jul-03 13:18 
GeneralRe: CTreeView and derived classes Pin
jhwurmbach22-Jul-03 22:24
jhwurmbach22-Jul-03 22:24 
GeneralRe: CTreeView and derived classes Pin
adonisv23-Jul-03 4:04
adonisv23-Jul-03 4:04 
GeneralRe: CTreeView and derived classes Pin
jhwurmbach23-Jul-03 4:42
jhwurmbach23-Jul-03 4:42 
GeneralRe: CTreeView and derived classes Pin
adonisv29-Jul-03 7:43
adonisv29-Jul-03 7:43 
GeneralRe: CTreeView and derived classes Pin
jhwurmbach29-Jul-03 21:33
jhwurmbach29-Jul-03 21:33 
Generalclosing another applications socket (firewall-like) Pin
Kuniva22-Jul-03 11:57
Kuniva22-Jul-03 11:57 
GeneralOh and btw Pin
Kuniva22-Jul-03 12:19
Kuniva22-Jul-03 12:19 
GeneralRe: Oh and btw Pin
Bob Stanneveld23-Jul-03 2:19
Bob Stanneveld23-Jul-03 2:19 
GeneralThai MFC Language resources needed Pin
Wolfram Steinke22-Jul-03 11:07
Wolfram Steinke22-Jul-03 11:07 
GeneralRe: Thai MFC Language resources needed Pin
Anthony_Yio22-Jul-03 15:25
Anthony_Yio22-Jul-03 15:25 
GeneralMulti-language problems Pin
22-Jul-03 10:57
suss22-Jul-03 10:57 
GeneralSetInformationJobObject() help...!!! Pin
bigeyedfish8122-Jul-03 10:56
bigeyedfish8122-Jul-03 10:56 
GeneralTab navigation problem Pin
skaanji22-Jul-03 10:32
skaanji22-Jul-03 10:32 
GeneralRe: Tab navigation problem Pin
KaЯl22-Jul-03 22:26
KaЯl22-Jul-03 22:26 
GeneralRe: Tab navigation problem Pin
skaanji23-Jul-03 1:40
skaanji23-Jul-03 1:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.