I don't know how to do!?
-
POINT Point; ::GetCursorPos(&Point); HWND hWnd = ::WindowFromPoint(Point); ::PostMessage(hWnd, WM_KEYDOWN, 'a', NULL); I sent a message WM_KEYDOWN to hWnd. It is activate on Windows Notepad.. but on games like need for speed, it isn't activate.. how do i do?
-
POINT Point; ::GetCursorPos(&Point); HWND hWnd = ::WindowFromPoint(Point); ::PostMessage(hWnd, WM_KEYDOWN, 'a', NULL); I sent a message WM_KEYDOWN to hWnd. It is activate on Windows Notepad.. but on games like need for speed, it isn't activate.. how do i do?
-
POINT Point; ::GetCursorPos(&Point); HWND hWnd = ::WindowFromPoint(Point); ::PostMessage(hWnd, WM_KEYDOWN, 'a', NULL); I sent a message WM_KEYDOWN to hWnd. It is activate on Windows Notepad.. but on games like need for speed, it isn't activate.. how do i do?
Games like need for speed doesn't use the usual windows messages system. Your application responds when your window gets the message through
WindProc
and themessage loop
. The way which is used in games is entirely different. A cool video :- http://www.youtube.com/watch?v=XLCe-hQ8lgE[^]"If A is a success in life, then A=x+y+z. (Work is x; y is play; and z is keeping your mouth shut.)"