Click here to Skip to main content
15,911,786 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Replacing contents of a file Pin
CPallini2-Mar-09 10:09
mveCPallini2-Mar-09 10:09 
GeneralRe: Replacing contents of a file Pin
Rajesh R Subramanian2-Mar-09 19:53
professionalRajesh R Subramanian2-Mar-09 19:53 
JokeRe: Replacing contents of a file Pin
CPallini2-Mar-09 21:18
mveCPallini2-Mar-09 21:18 
QuestionOnAppExit not called when X button clicked Pin
TimmySRX2-Mar-09 9:49
TimmySRX2-Mar-09 9:49 
AnswerRe: OnAppExit not called when X button clicked Pin
Stuart Dootson2-Mar-09 10:15
professionalStuart Dootson2-Mar-09 10:15 
GeneralRe: OnAppExit not called when X button clicked Pin
TimmySRX2-Mar-09 11:05
TimmySRX2-Mar-09 11:05 
GeneralRe: OnAppExit not called when X button clicked Pin
Iain Clarke, Warrior Programmer2-Mar-09 23:04
Iain Clarke, Warrior Programmer2-Mar-09 23:04 
QuestionSendKeys won't work Pin
Ran42-Mar-09 8:49
Ran42-Mar-09 8:49 
(I've now spent the last 2½ hours trying to get this to work. I've read something like 60 pages on google.).

I'm trying to get the SendKeys for C++ to work, but to no avail.
I have tried what I think is all possible variations of SendKeys.h, windows.h, StdAfx.h and "#define _WIN32_WINNT 0x0501" (I have seen 0x0501, 500, 400, 401, 503, 510... Everyone says that what they say work. Well... no.). I simply cannot include that INPUT object (error C2065: 'INPUT' : undeclared identifier).

I am quite certain that all I need is to have ~5 rows of code in the right place. Which are these codes, and in which order should they be?

I'm using Visual C++ 6.0 (I also have the 2008 version available) with Windows XP SP2.

Now, I suppose you are supposed to do something like this:
1. Create a win32 project in visual c++ 6.0
2. Add a main.cpp file which has the main function in it
3. Add the SendKeys.cpp, StdAfk.cpp, SendKeys.h, StdAfx.h and resource.h files to the project (right-click -> add files to folder?)
4. Write something weird at the very beginning of StdAfx.h
5. Include the right things in my main.cpp
6. Create the main function, then create a CSendKeys object and then use it
7... here on, I could probably follow the official guide.

Which of the above is wrong?
AnswerRe: SendKeys won't work Pin
led mike2-Mar-09 9:49
led mike2-Mar-09 9:49 
GeneralRe: SendKeys won't work Pin
Ran42-Mar-09 10:14
Ran42-Mar-09 10:14 
GeneralRe: SendKeys won't work Pin
CPallini2-Mar-09 10:19
mveCPallini2-Mar-09 10:19 
AnswerRe: SendKeys won't work Pin
«_Superman_»2-Mar-09 17:33
professional«_Superman_»2-Mar-09 17:33 
GeneralRe: SendKeys won't work Pin
davidjaybrown3-Mar-09 8:49
davidjaybrown3-Mar-09 8:49 
GeneralRe: SendKeys won't work Pin
«_Superman_»3-Mar-09 15:59
professional«_Superman_»3-Mar-09 15:59 
QuestionCompile Error Actual linking error ....Can someone help. Pin
FISH7862-Mar-09 8:01
FISH7862-Mar-09 8:01 
AnswerRe: Compile Error Actual linking error ....Can someone help. Pin
Jonathan Davies2-Mar-09 8:05
Jonathan Davies2-Mar-09 8:05 
AnswerRe: Compile Error Actual linking error ....Can someone help. Pin
Cedric Moonen2-Mar-09 8:06
Cedric Moonen2-Mar-09 8:06 
GeneralRe: Compile Error Actual linking error ....Can someone help. Pin
FISH7862-Mar-09 8:09
FISH7862-Mar-09 8:09 
GeneralRe: Compile Error Actual linking error ....Can someone help. Pin
Cedric Moonen2-Mar-09 8:12
Cedric Moonen2-Mar-09 8:12 
GeneralRe: Compile Error Actual linking error ....Can someone help. Pin
Cedric Moonen2-Mar-09 8:14
Cedric Moonen2-Mar-09 8:14 
GeneralRe: Compile Error Actual linking error ....Can someone help. Pin
FISH7862-Mar-09 8:34
FISH7862-Mar-09 8:34 
GeneralRe: Compile Error Actual linking error ....Can someone help. Pin
FISH7862-Mar-09 8:58
FISH7862-Mar-09 8:58 
GeneralRe: Compile Error Actual linking error ....Can someone help. Pin
Jonathan Davies2-Mar-09 12:23
Jonathan Davies2-Mar-09 12:23 
GeneralRe: Compile Error Actual linking error ....Can someone help. Pin
FISH7862-Mar-09 16:52
FISH7862-Mar-09 16:52 
GeneralRe: Compile Error Actual linking error ....Can someone help. Pin
Jonathan Davies3-Mar-09 0:25
Jonathan Davies3-Mar-09 0:25 

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.