Click here to Skip to main content
15,889,462 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionExecuting an Oracle Query from C++ using OLEDB Pin
JaeBeam11-Jun-09 10:44
JaeBeam11-Jun-09 10:44 
AnswerRe: Executing an Oracle Query from C++ using OLEDB Pin
led mike11-Jun-09 10:57
led mike11-Jun-09 10:57 
AnswerRe: Executing an Oracle Query from C++ using OLEDB Pin
Ozer Karaagac11-Jun-09 13:26
professionalOzer Karaagac11-Jun-09 13:26 
QuestionIs there an easy way to change "... text ..." to _T("... text ...") for whole project? [modified] Pin
transoft11-Jun-09 9:32
transoft11-Jun-09 9:32 
AnswerRe: Is there an easy way to change "... text ..." to _T("... text ...") for whole project? PinPopular
Randor 11-Jun-09 10:24
professional Randor 11-Jun-09 10:24 
GeneralThank you very much, Pin
transoft11-Jun-09 10:37
transoft11-Jun-09 10:37 
GeneralRe: Is there an easy way to change "... text ..." to _T("... text ...") for whole project? Pin
Rajesh R Subramanian11-Jun-09 10:45
professionalRajesh R Subramanian11-Jun-09 10:45 
QuestionProblem with sending keystroke to game. [modified] Pin
dirwir11-Jun-09 9:26
dirwir11-Jun-09 9:26 
Hi, I have some problem with sending keystroke/keystroks to a full screen game (Counter Strike Source, if it matter). What I want to do is simply send a lot of keystroke, for example so your character jump automatics while you hold down a key.

I have try to use keybd_event and SendInput, neither of them seems to work the way I want them to. Both work with menus and chat windows but have no effect in gameplay. So I can press for example 'y' and open the chat window and then let the program write there but it can't open it by itself, or no keys like jump(blankspace) and forward(w) works neither (in gameplay).

My SendKey function look like this,
void SinKey(WORD keyCode)
{
	INPUT key;

	key.type = INPUT_KEYBOARD;
	key.ki.wVk = keyCode;
	key.ki.dwFlags = 0;
	key.ki.time = 0;
	key.ki.wScan = 0;
	key.ki.dwExtraInfo = 0;

	SendInput(1,&key,sizeof(INPUT));
	key.ki.dwExtraInfo = KEYEVENTF_KEYUP;
	SendInput(1,&key,sizeof(INPUT));
}


and my keybd_event function look like this.
void keyPress(unsigned char keyCode)
{
	keybd_event( keyCode, 0x45, KEYEVENTF_EXTENDEDKEY, 0 );
	keybd_event( keyCode, 0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0 );
}


As I said, both work in menus and for example noteopad but not in games.
Have this something with directx to do?
If you have any idea/ideas or even better a solution please let me know Smile | :) .
Thanks for all help I can get.

edit: pls reply in the forum becouse the email address I have here has ceased to function.
edit2: I have got a tip to use spy++ and I working on it. I will also add the solution here as soon as I find one.

modified on Thursday, June 11, 2009 7:05 PM

AnswerRe: Problem with sending keystroke to game. Pin
Rajesh R Subramanian11-Jun-09 10:21
professionalRajesh R Subramanian11-Jun-09 10:21 
GeneralRe: Problem with sending keystroke to game. Pin
dirwir11-Jun-09 13:05
dirwir11-Jun-09 13:05 
Questioncreating a linked list Pin
steve_rm11-Jun-09 7:18
steve_rm11-Jun-09 7:18 
AnswerRe: creating a linked list Pin
Maximilien11-Jun-09 7:59
Maximilien11-Jun-09 7:59 
AnswerRe: creating a linked list Pin
David Crow11-Jun-09 8:26
David Crow11-Jun-09 8:26 
QuestionRe: creating a linked list Pin
steve_rm11-Jun-09 16:30
steve_rm11-Jun-09 16:30 
AnswerRe: creating a linked list Pin
David Crow12-Jun-09 3:29
David Crow12-Jun-09 3:29 
QuestionRe: creating a linked list Pin
led mike11-Jun-09 8:28
led mike11-Jun-09 8:28 
AnswerRe: creating a linked list Pin
steve_rm11-Jun-09 16:35
steve_rm11-Jun-09 16:35 
QuestionRe: creating a linked list Pin
David Crow26-Jun-09 7:51
David Crow26-Jun-09 7:51 
Questionset the parameter of CRichEditCtrl ::SetWindowText() Pin
MrKBA11-Jun-09 5:18
MrKBA11-Jun-09 5:18 
AnswerRe: set the parameter of CRichEditCtrl ::SetWindowText() Pin
Stephen Hewitt11-Jun-09 5:58
Stephen Hewitt11-Jun-09 5:58 
GeneralRe: set the parameter of CRichEditCtrl ::SetWindowText() Pin
MrKBA11-Jun-09 6:01
MrKBA11-Jun-09 6:01 
GeneralRe: set the parameter of CRichEditCtrl ::SetWindowText() Pin
Michael Schubert11-Jun-09 6:12
Michael Schubert11-Jun-09 6:12 
GeneralRe: set the parameter of CRichEditCtrl ::SetWindowText() Pin
MrKBA11-Jun-09 6:40
MrKBA11-Jun-09 6:40 
GeneralRe: set the parameter of CRichEditCtrl ::SetWindowText() Pin
Michael Schubert11-Jun-09 20:50
Michael Schubert11-Jun-09 20:50 
Questioncan you find the problem?? Pin
August Brower11-Jun-09 5:10
August Brower11-Jun-09 5:10 

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.