Click here to Skip to main content
15,888,527 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: WM_CTLCOLORLISTBOX Pin
pubududilena15-Nov-04 21:40
pubududilena15-Nov-04 21:40 
GeneralAlgorithm for generating Alphanumeric characters Pin
Mythri.B.L15-Nov-04 20:40
Mythri.B.L15-Nov-04 20:40 
GeneralRe: Algorithm for generating Alphanumeric characters Pin
DaFrawg15-Nov-04 20:50
DaFrawg15-Nov-04 20:50 
GeneralRe: Algorithm for generating Alphanumeric characters Pin
David Crow16-Nov-04 3:00
David Crow16-Nov-04 3:00 
GeneralDDK Pin
snthomas15-Nov-04 20:01
snthomas15-Nov-04 20:01 
GeneralRe: DDK Pin
DaFrawg15-Nov-04 20:34
DaFrawg15-Nov-04 20:34 
Generalabout floating keyboard Pin
Tripura.K15-Nov-04 18:11
Tripura.K15-Nov-04 18:11 
GeneralRe: about floating keyboard Pin
DaFrawg15-Nov-04 20:48
DaFrawg15-Nov-04 20:48 
Take a look at MSDN - Keyboard Input[^]. There you can find messages you can pass to the window
that must think that someone pressed that specific key on the keyboard. You can send WM_KEYDOWN or WM_SYSKEYDOWN when the button is pressed, and WM_KEYUP or WM_SYSKEYUP when the button is released.

For instance, you could do
void MyDialog::OnButton49() 
{
GetParent()->SendMessage(WM_CAPTURECHANGED,49,1);
GetParent()->SendMessage(WM_KEYDOWN, VK_A, NULL);
GetParent()->SendMessage(WM_KEYUP, VK_A, NULL);
}

I'm not sure about those VK_A (I'm at school now and I don't know the Virtual Key list by heart). You can also replace those NULLs by control codes that indicate if CTRL or AltGrp is pressed in addition.

By the way, don't include too much commented lines. It looks nasty and it makes it unreadable. There is also a way to use one single function for all buttons (with a custom WindowProc), so that you don't have to make a function for each button on your virtual keyboard.
GeneralHandling Files in Visual C++ Pin
shanil8015-Nov-04 18:09
shanil8015-Nov-04 18:09 
GeneralRe: Handling Files in Visual C++ Pin
shiraztk15-Nov-04 23:57
shiraztk15-Nov-04 23:57 
GeneralRe: Handling Files in Visual C++ Pin
krmed16-Nov-04 0:53
krmed16-Nov-04 0:53 
GeneralRe: Handling Files in Visual C++ Pin
David Crow16-Nov-04 3:04
David Crow16-Nov-04 3:04 
GeneralRe: Handling Files in Visual C++ Pin
shanil8019-Nov-04 3:12
shanil8019-Nov-04 3:12 
GeneralRe: Handling Files in Visual C++ Pin
David Crow19-Nov-04 3:56
David Crow19-Nov-04 3:56 
GeneralRe: Handling Files in Visual C++ Pin
shanil8019-Nov-04 17:27
shanil8019-Nov-04 17:27 
GeneralRe: Handling Files in Visual C++ Pin
David Crow22-Nov-04 2:33
David Crow22-Nov-04 2:33 
Generalload image fail Pin
vc-programmer-15-Nov-04 18:00
vc-programmer-15-Nov-04 18:00 
GeneralRe: load image fail Pin
pubududilena15-Nov-04 20:31
pubududilena15-Nov-04 20:31 
GeneralRe: load image fail Pin
namaskaaram15-Nov-04 21:44
namaskaaram15-Nov-04 21:44 
GeneralRe: load image fail Pin
vc-programmer-15-Nov-04 21:59
vc-programmer-15-Nov-04 21:59 
GeneralRe: load image fail Pin
namaskaaram15-Nov-04 22:26
namaskaaram15-Nov-04 22:26 
GeneralTreeviw control and Unicode Pin
Alpha Siera15-Nov-04 17:46
Alpha Siera15-Nov-04 17:46 
GeneralHelp Pin
James198515-Nov-04 16:14
James198515-Nov-04 16:14 
GeneralRe: Help Pin
ThatsAlok15-Nov-04 23:10
ThatsAlok15-Nov-04 23:10 
QuestionHow to change font color of slide? Pin
cengyikun52115-Nov-04 15:33
susscengyikun52115-Nov-04 15:33 

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.