Click here to Skip to main content
15,902,198 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRecordset Open(using select statement) Pin
vc-programmer-15-Nov-04 22:49
vc-programmer-15-Nov-04 22:49 
Generalfind pid for an open tcp connection in Windows 2000 Pin
Anonymous15-Nov-04 22:27
Anonymous15-Nov-04 22:27 
GeneralDialog Variable can not be assigned Pin
Jens Lüddecke15-Nov-04 22:16
Jens Lüddecke15-Nov-04 22:16 
QuestionMultiple selection in CTreeCtrl possible… ? Pin
anderslundsgard15-Nov-04 21:46
anderslundsgard15-Nov-04 21:46 
AnswerRe: Multiple selection in CTreeCtrl possible… ? Pin
Maximilien16-Nov-04 2:23
Maximilien16-Nov-04 2:23 
QuestionHow to Hide the MFC Opening Dialog Box when open the Application.? Pin
pubududilena15-Nov-04 21:35
pubududilena15-Nov-04 21:35 
AnswerRe: How to Hide the MFC Opening Dialog Box when open the Application.? Pin
Selvam R16-Nov-04 2:21
professionalSelvam R16-Nov-04 2:21 
AnswerRe: How to Hide the MFC Opening Dialog Box when open the Application.? Pin
ThatsAlok16-Nov-04 2:32
ThatsAlok16-Nov-04 2:32 
AnswerRe: How to Hide the MFC Opening Dialog Box when open the Application.? Pin
David Crow16-Nov-04 2:54
David Crow16-Nov-04 2:54 
Generalusing LBS_MULTIPLELSEL Pin
V.G15-Nov-04 21:15
V.G15-Nov-04 21:15 
GeneralRe: using LBS_MULTIPLELSEL Pin
pubududilena15-Nov-04 22:03
pubududilena15-Nov-04 22:03 
GeneralRe: using LBS_MULTIPLELSEL Pin
David Crow16-Nov-04 2:56
David Crow16-Nov-04 2:56 
GeneralRe: using LBS_MULTIPLELSEL Pin
V.G16-Nov-04 3:40
V.G16-Nov-04 3:40 
GeneralRe: using LBS_MULTIPLELSEL Pin
David Crow16-Nov-04 3:56
David Crow16-Nov-04 3:56 
GeneralWM_CTLCOLORLISTBOX Pin
V.G15-Nov-04 21:11
V.G15-Nov-04 21:11 
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 

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.