I understand thats not what you're looking for right now. I don't know how to solve your problem without a windows PC to test, so hopefully someone else can step in and help.
Printable View
the problem is somewhere in the msg handler, i logged in on runescape before hijacking the client window and i could click stuff but not type
maybe the problem is ive been using an on screen keyboard that wouldnt alert the msg handler of my program?
WUT? U cant even put SendMessage in the callback proc like that -___- it'll never do what you want. Your message handler isn't properly constructed.
Code:LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
int WINAPI WinMain(............)
{
CreateWindowEx(..........);
ShowWindow(hwnd, nCmdShow);
UpdateWindow(hwnd);
while(GetMessage (&messages, NULL, 0, 0))
{
TranslateMessage(&messages);
DispatchMessage(&messages);
}
}
LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
PAINTSTRUCT PS;
HDC hdc;
switch (message)
{
case WM_CREATE:
{
HWND SomeHandle = FindWindow(NULL, "SomeWindowName");
SendMessage(SomeHandle, WM_SETFONT, (WPARAM)hFont, (LPARAM) NULL); //Edit this to your liking or whatever
}
break;
case WM_PAINT:
hdc = BeginPaint(hwnd, &PS);
EndPaint(hwnd, &PS);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return DefWindowProc (hwnd, message, wParam, lParam);
}
}
@ggzz yeah i figured that out. it was my first time using child windows and i thought all events were auto sent to parent.
the problem dissapeared :o time to make the bot