Click here to Skip to main content
15,897,090 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
JokeRe: BUG IN C (LINKED LIST CODE).......please Help me Pin
Cedric Moonen26-Feb-10 3:13
Cedric Moonen26-Feb-10 3:13 
JokeRe: BUG IN C (LINKED LIST CODE).......please Help me Pin
Nelek26-Feb-10 3:20
protectorNelek26-Feb-10 3:20 
GeneralRe: BUG IN C (LINKED LIST CODE).......please Help me Pin
Cedric Moonen26-Feb-10 3:46
Cedric Moonen26-Feb-10 3:46 
JokeRe: BUG IN C (LINKED LIST CODE).......please Help me Pin
Nelek26-Feb-10 3:56
protectorNelek26-Feb-10 3:56 
GeneralRe: BUG IN C (LINKED LIST CODE).......please Help me Pin
CPallini26-Feb-10 6:02
mveCPallini26-Feb-10 6:02 
AnswerRe: BUG IN C (LINKED LIST CODE).......please Help me Pin
CPallini26-Feb-10 2:08
mveCPallini26-Feb-10 2:08 
AnswerRe: BUG IN C (LINKED LIST CODE).......please Help me Pin
Avi Berger26-Feb-10 7:02
Avi Berger26-Feb-10 7:02 
QuestionDrag Drop from .net application to outside it Pin
Aseem Sharma26-Feb-10 1:56
Aseem Sharma26-Feb-10 1:56 
QuestionAvoiding "auto-select" in editable combobox Pin
Code-o-mat25-Feb-10 23:46
Code-o-mat25-Feb-10 23:46 
AnswerRe: Avoiding "auto-select" in editable combobox Pin
Eugen Podsypalnikov25-Feb-10 23:57
Eugen Podsypalnikov25-Feb-10 23:57 
GeneralRe: Avoiding "auto-select" in editable combobox Pin
Code-o-mat26-Feb-10 0:34
Code-o-mat26-Feb-10 0:34 
GeneralRe: Avoiding "auto-select" in editable combobox Pin
Eugen Podsypalnikov26-Feb-10 1:32
Eugen Podsypalnikov26-Feb-10 1:32 
AnswerRe: Avoiding "auto-select" in editable combobox Pin
Eugen Podsypalnikov26-Feb-10 1:51
Eugen Podsypalnikov26-Feb-10 1:51 
AnswerRe: Avoiding "auto-select" in editable combobox Pin
SandipG 26-Feb-10 1:59
SandipG 26-Feb-10 1:59 
GeneralRe: Avoiding "auto-select" in editable combobox Pin
Code-o-mat26-Feb-10 2:21
Code-o-mat26-Feb-10 2:21 
AnswerRe: Avoiding "auto-select" in editable combobox Pin
Code-o-mat26-Feb-10 2:42
Code-o-mat26-Feb-10 2:42 
QuestionCPU Usage & Mem Usage Pin
john563225-Feb-10 23:35
john563225-Feb-10 23:35 
AnswerRe: CPU Usage & Mem Usage Pin
«_Superman_»26-Feb-10 0:56
professional«_Superman_»26-Feb-10 0:56 
AnswerRe: CPU Usage & Mem Usage Pin
Rajesh R Subramanian26-Feb-10 1:29
professionalRajesh R Subramanian26-Feb-10 1:29 
QuestionMouse Event Pin
john563225-Feb-10 20:49
john563225-Feb-10 20:49 
AnswerRe: Mouse Event Pin
KarstenK25-Feb-10 21:10
mveKarstenK25-Feb-10 21:10 
AnswerRe: Mouse Event Pin
«_Superman_»25-Feb-10 21:16
professional«_Superman_»25-Feb-10 21:16 
AnswerRe: Mouse Event Pin
wangningyu26-Feb-10 21:07
wangningyu26-Feb-10 21:07 
1、keyboard event:

keybd_event(VK_CONTROL,0,0,0);
keybd_event(VK_MENU, 0, 0, 0);  
keybd_event('S', 0, 0, 0);   
 
keybd_event('S', 0, KEYEVENTF_KEYUP, 0);   
keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0);
keybd_event(VK_CONTROL,0,KEYEVENTF_KEYUP,0);  


::PostMessage(hWnd,WM_KEYDOWN,VK_CONTROL,0);
::PostMessage(hWnd,WM_KEYDOWN,VK_MENU,0);
::PostMessage(hWnd,WM_KEYDOWN,'1',0);

::PostMessage(hWnd,WM_KEYUP,'1',0);
::PostMessage(hWnd,WM_KEYUP,VK_MENU,0);
::PostMessage(hWnd,WM_KEYUP,VK_CONTROL,0);



2、mouse event:
CString gameCaption="XXXXX";
HWND	hWnd=::FindWindow(NULL,gameCaption);
DWORD	dwPid;
RECT	rect;
POINT	ptOld;

::GetWindowThreadProcessId(hWnd,&dwPid);
::GetWindowRect(hWnd,&rect);

::GetCursorPos(&ptOld);
::SetCursorPos(80,150);

mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);

SetCursorPos(rect.left +200,rect.top +150);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);


CString gameCaption="XXXXX";
HWND	hWnd=::FindWindow(NULL,gameCaption);

::PostMessage(hWnd,WM_MOUSEMOVE, MK_LBUTTON, MAKELONG(80,130));
::PostMessage(hWnd,WM_LBUTTONDOWN,MK_LBUTTON,MAKELPARAM(80,130));   
::PostMessage(hWnd,WM_LBUTTONUP,MK_LBUTTON,MAKELPARAM(80,130));
Sleep(10);



more Information,please click here.
http://blog.csdn.net/wangningyu/archive/2009/12/13/4994295.aspx
QuestionCompressed image movement is too slow Pin
Game-point25-Feb-10 19:25
Game-point25-Feb-10 19:25 
AnswerRe: Compressed image movement is too slow Pin
Stuart Dootson25-Feb-10 20:43
professionalStuart Dootson25-Feb-10 20:43 

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.