Ok, here's what you want.
Just call InitAppRepaint after you create your graphics window and call AppRepaint to see if your window has recieved the WM_PAINT message.
Function InitAppRepaint() Local hwnd=GetActiveWindow() OldWndProc=Byte Ptr(GetWindowLongA(hwnd,GWL_WNDPROC)) SetWindowLongA(hwnd,GWL_WNDPROC,Int(Byte Ptr(wpWndProc))) End Function Function AppRepaint() Local temp=RepaintWindow RepaintWindow=False Return temp End Function Global RepaintWindow=False Global OldWndProc(hwnd,msg,wParam,lParam) Function wpWndProc(hwnd,msg,wParam,lParam) If msg=WM_PAINT RepaintWindow=True Return OldWndProc(hwnd,msg,wParam,lParam) End Function
Just call InitAppRepaint after you create your graphics window and call AppRepaint to see if your window has recieved the WM_PAINT message.