Outside of the main, I define a mouse event handler as
main
int xPosAbsolute = 0; int yPosAbsolute = 0; LRESULT CALLBACK WndProc(HWND hwnd, UINT msg,