Board index » delphi » Repainting whole desktop?

Repainting whole desktop?

Hi All -

Can someone help me past this attack of stupidity?

I have an app which has a "full screen" mode (like MS Word).
The problem is that when the app is restored to normal, any
windows that were beneath mine are in dire need of repainting
(including the taskbar and other app bars). I've tried
broadcasting WM_PAINT messages, and invalidating the
desktop window, but I cannot force these other windows to
repaint.

Any takers?

--
Jeremy Collins

 

Re:Repainting whole desktop?


Quote
Jeremy Collins wrote in message

<919425209.11081.0.nnrp-01.c2de6...@news.demon.co.uk>...

Quote
>windows that were beneath mine are in dire need of repainting
>(including the taskbar and other app bars). I've tried
>broadcasting WM_PAINT messages, and invalidating the
>desktop window, but I cannot force these other windows to
>repaint.

Doh - found it. I was halfway through writing a routine
that enumerated all top-level windows and forced them
to repaint when I  discovered that:

  InvalidateRect(0, nil, True);

would do the job!

--
Jeremy Collins

Re:Repainting whole desktop?


This will refresh all windows.

procedure ...
var
 dc:hdc;
 r:TRect;
begin
dc:=0;
 r:=Rect(0,0,Screen.Width,Screen.Height);
 InvalidateRect(dc,@r,true);
 ReleaseDC(0,dc);
end;

On Fri, 19 Feb 1999 11:52:22 -0000, "Jeremy Collins"

Quote
<j...@jcollins.demon.co.uk> wrote:

>Hi All -

>Can someone help me past this attack of stupidity?

>I have an app which has a "full screen" mode (like MS Word).
>The problem is that when the app is restored to normal, any
>windows that were beneath mine are in dire need of repainting
>(including the taskbar and other app bars). I've tried
>broadcasting WM_PAINT messages, and invalidating the
>desktop window, but I cannot force these other windows to
>repaint.

>Any takers?

Other Threads