Click here to Skip to main content
15,890,123 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Using cursor as Icons in toolbar Pin
Antti Keskinen5-Aug-04 6:37
Antti Keskinen5-Aug-04 6:37 
Generaldisable the Task manager Pin
X20404-Aug-04 12:30
X20404-Aug-04 12:30 
GeneralRe: disable the Task manager Pin
Antti Keskinen5-Aug-04 6:40
Antti Keskinen5-Aug-04 6:40 
GeneralRe: disable the Task manager Pin
Bo Hunter5-Aug-04 12:17
Bo Hunter5-Aug-04 12:17 
GeneralRe: disable the Task manager Pin
ThatsAlok5-Aug-04 22:15
ThatsAlok5-Aug-04 22:15 
GeneralMenu check button ... Pin
smack_2k24-Aug-04 10:11
smack_2k24-Aug-04 10:11 
QuestionHow to send mouse/keyboard to a background app? Pin
Member 6253944-Aug-04 9:00
Member 6253944-Aug-04 9:00 
AnswerRe: How to send mouse/keyboard to a background app? Pin
crondeemon4-Aug-04 9:48
crondeemon4-Aug-04 9:48 
Im having a smiliar question and was about to post it, but mine is almost the opposite.

I have a background app that has a recorded sequence of key presses and I want to send them to my foreground app.

I think possibly the answer to your question may be answer to my question.

Now, I have tried things like hooking the KB, and tried code segments like this one:

void SetRIGHT( BOOL bState )
{
BYTE keyState[256];
GetKeyboardState((LPBYTE)&keyState);
if( (bState && !(keyState[VK_RIGHT] & 1)) ||
(!bState && (keyState[VK_RIGHT] & 1)) )
{
// Simulate a key press
keybd_event( VK_RIGHT,
0x45,
KEYEVENTF_EXTENDEDKEY | 0,
0 );

// Simulate a key release
keybd_event( VK_RIGHT,
0x45,
KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,
0 );
}
}

Then moving foreground to my app I want to recieve the input, alas, it dosent do what I want it to. It does however result in strange things happening like the right and left arrow keys get stuck so I have to hit them twice, im sure its a conflict in what im doing.

Anyhow, Thanks in advance,
Charles
GeneralRe: How to send mouse/keyboard to a background app? Pin
Member 6253944-Aug-04 10:00
Member 6253944-Aug-04 10:00 
AnswerRe: How to send mouse/keyboard to a background app? Pin
crondeemon4-Aug-04 10:03
crondeemon4-Aug-04 10:03 
QuestionHow to NULL arrays? Pin
CreepingFeature4-Aug-04 8:13
CreepingFeature4-Aug-04 8:13 
AnswerRe: How to NULL arrays? Pin
User 66584-Aug-04 8:45
User 66584-Aug-04 8:45 
AnswerRe: How to NULL arrays? Pin
digwizfox4-Aug-04 8:49
digwizfox4-Aug-04 8:49 
GeneralRe: How to NULL arrays? Pin
CreepingFeature4-Aug-04 20:46
CreepingFeature4-Aug-04 20:46 
GeneralRe: How to NULL arrays? Pin
digwizfox5-Aug-04 5:55
digwizfox5-Aug-04 5:55 
GeneralRe: How to NULL arrays? Pin
Antti Keskinen5-Aug-04 6:51
Antti Keskinen5-Aug-04 6:51 
General2 q's about non-mfc apps Pin
Archer2824-Aug-04 8:12
Archer2824-Aug-04 8:12 
GeneralRe: 2 q's about non-mfc apps Pin
PJ Arends4-Aug-04 18:11
professionalPJ Arends4-Aug-04 18:11 
GeneralInstallation Package Question Pin
Red Sunday4-Aug-04 7:49
Red Sunday4-Aug-04 7:49 
GeneralRe: Installation Package Question Pin
palbano4-Aug-04 7:56
palbano4-Aug-04 7:56 
Generalmfc concatenating files Pin
ns4-Aug-04 7:47
ns4-Aug-04 7:47 
GeneralRe: mfc concatenating files Pin
palbano4-Aug-04 7:53
palbano4-Aug-04 7:53 
GeneralRe: mfc concatenating files Pin
David Crow4-Aug-04 7:56
David Crow4-Aug-04 7:56 
GeneralRe: mfc concatenating files Pin
ns5-Aug-04 1:52
ns5-Aug-04 1:52 
GeneralIcon problem Pin
doctorpi4-Aug-04 7:19
doctorpi4-Aug-04 7:19 

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.