>Is there anywhere in a form where one can trap
>WM_ messages like this C code?
>
>
>Best regards
>Per Simmersholm
>
>
> while(1) {
> while(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
> if(msg.message==WM_QUIT)
> break;
> TranslateMessage(&msg);
> DispatchMessage(&msg);
> }
> if(msg.message==WM_QUIT)
> break;
> Refresh(); // idle, refresh the display
> }
> return(msg.wParam);
Nope - there's no way to insert something into the VFP event loop to intercept incoming Windows Messages. It might be doable with an ActiveX control or an API hook into the event loop, but I haven't tried, and it wouldn't be written in VFP to do this...