🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.misc
Article #2190

Re: How does Windows draw the "ghost frame"?

#2190
From: Jan Schiefer
Date: Sat, 21 Nov 1992 00:40
30 lines
1751 bytes
ngorelic@speclab.cr.usgs.gov.cr.usgs.gov (Noel S. Gorelick) wrote:
> Jan Schiefer (jan@nasobem.stgt.sub.org) wrote:
> > I am trying to draw a frame similar to the "ghost frame" Windows draws
> > when you move a window by dragging the caption bar. I am having problems,
> > however.
>
> We had to do this.  The absolutly easiest way is to draw the ghost frame
> yourself using an XOR pen and DrawRect().  Force a WM_Paint of the thing
> you are drawing on top each time you draw your rectangle and you wont
> get any mouse jumping.  (if you dont force it, the WM_Paints happen whenever
> they feel like it and they jump pretty badly.)
>
> If anyone has a better way, PLEASE let me know.  I spent more than a good man
> week on this problem.

I did this, too, but it was a bit slow sometimes (I just drew the rectangle
inside WM_MOUSEMOVE processing, as I captured the mouse anyway).

In the meantime I found a solution, which works better for me: now I use
DrawFocusRect(HDC, LPRECT), which seems quite a bit faster. It draws just
a thin outline, but is in XOR mode automatically. As I just have to move
a child window, the thin outline is ok for me.

Thanks to all who answered!

Jan

--
             Jan Schiefer, DL5UE, jan@nasobem.stgt.sub.org
                 "Oracle et laboracle!"   - Fritz Hohl
Technical Details
Message-ID: <6033.921121@nasobem.stgt.sub.org>
Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!emory!swrinde!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!smurf.sub.org!nadia!delos!nasobem!jan

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!emory!swrinde!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!smurf.sub.org!nadia!delos!nasobem!jan
From: jan@nasobem.stgt.sub.org (Jan Schiefer)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: How does Windows draw the "ghost frame"?
Message-ID: <6033.921121@nasobem.stgt.sub.org>
Date: Sat, 21 Nov 92 0:40:33 GMT
Distribution: world
Lines:  30