Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
// Assume (WM_APP+1) is not already in use by the program
// Otherwise use (WM_APP+something else)
#define WM_CALCULATION (WM_APP+1)
// At global scope
BOOL fMouseMove = FALSE;
WPARAM MouseMovewParam;
LPARAM MouseMovelParam;
HWND hWndMouseMove;
void ExpensiveCalculation ( )
{
// Calculates something using hWndMouseMove, MouseMovewParam and MouseMovelParam
}
// In your Windows procedure
case WM_MOUSEMOVE :
MouseMovewParam = wParam;
MouseMovelParam = lParam;
hWmdMouseMove = hWnd;
if ( !fMouseMove )
{ fMouseMove = TRUE;
PostMessage ( hWnd, WM_CALCULATION, 0, 0 ); }
break;
case WM_CALCULATION :
ExpensiveCalculation ( );
fMouseMove = FALSE;
break;