[Solved] expected a “;” on strange place

You should move MouseHookProc definition outside of main. C++ does not allow function definitions inside of other functions. Among other things, (LPTHREAD_START_ROUTINE)clicker is also wrong, there is no need to perform cast here, instead clicker function must have correct signature, void down(); is actually a function declaration, not invocation. 2 solved expected a “;” on … Read more

[Solved] Wait for message delivered to MainWindow sent using SendMessage API

Here is the sample code in C++,(Removed error checking) MainWindow.cpp: #include <windows.h> #include <iostream> LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } return 0; } DWORD WINAPI createyourwindow(LPVOID param) { WNDCLASSEXW wcex = { 0 }; wcex.cbSize = … Read more