Windows >> Builder 3 DrawGrid
Posted by brian.h on 08:34:00 01-23-2003
How can I stop the windows screen saver from wiping my DrawGrid contents?
"Frustraiting!!"

[ This Message was edited by: brian.h on 2003-01-23 08:36 ]
Posted by KaGez on 21:14:00 01-23-2003
windows problems --> windows section.
Please
But otherwise, I have no idea, sorry Linux is the one and only OS on my comp.
[addsig]
Posted by dxprog on 00:04:00 01-24-2003
I'm writing this post assuming DrawGrid is some sort of a graphics\design program. It sounds like it doesn't reblit the screen after you get out of the screen saver. The only solution I can think of write your own "DrawGrid" program fixing this error or turn off the screen saver. Otherwise I have no idea. Sorry. [addsig]
Posted by DarkEvilOne on 08:07:00 02-13-2003
When a window gets covered up by another window or resized or a few other things it is sent a WM_PAINT message telling it to redraw cause the client area has been changed or covered up by another window etc.

Anyways i'm not sure what DrawGrid is or how its used or anything but what i would suggest is to add a handler for the WM_PAINT message to your window procedure then add the following code to it:

PAINTSTRUCT ps;
HDC hdc;

hdc = BeginPaint(hwnd, &ps);
EndPaint(hwnd, &ps);

Followed by the code for DrawGrid. The code here will "validate the window", basically tell windows you have redrawn the section of the window that got covered up or whatever. Right after that you will want to redraw your grid(if thats what DrawGrid does).

[edit]
/me went crazy with C/C++ replies D'oh!
If you are using C/C++ the above should help you. But if you are using VB i think you have to set the forms AutoRedraw property to true or something. Then i think its the Form_Paint event that will be called when part of the window is covered up etc so just watch for the Form_Paint event and when it fires put your DrawGrid code there.

[ This Message was edited by: DarkEvilOne on 2003-02-13 17:34 ]