home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / mswindo / programm / misc / 3605 < prev    next >
Encoding:
Internet Message Format  |  1992-11-22  |  1.7 KB

  1. Path: 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
  2. From: jan@nasobem.stgt.sub.org (Jan Schiefer)
  3. Newsgroups: comp.os.ms-windows.programmer.misc
  4. Subject: Re: How does Windows draw the "ghost frame"?
  5. Message-ID: <6033.921121@nasobem.stgt.sub.org>
  6. Date: Sat, 21 Nov 92 0:40:33 GMT
  7. Distribution: world
  8. Lines:  30
  9.  
  10. ngorelic@speclab.cr.usgs.gov.cr.usgs.gov (Noel S. Gorelick) wrote:
  11. > Jan Schiefer (jan@nasobem.stgt.sub.org) wrote:
  12. > > I am trying to draw a frame similar to the "ghost frame" Windows draws
  13. > > when you move a window by dragging the caption bar. I am having problems,
  14. > > however.
  15. >
  16. > We had to do this.  The absolutly easiest way is to draw the ghost frame
  17. > yourself using an XOR pen and DrawRect().  Force a WM_Paint of the thing
  18. > you are drawing on top each time you draw your rectangle and you wont
  19. > get any mouse jumping.  (if you dont force it, the WM_Paints happen whenever
  20. > they feel like it and they jump pretty badly.)
  21. >
  22. > If anyone has a better way, PLEASE let me know.  I spent more than a good man
  23. > week on this problem.
  24.  
  25. I did this, too, but it was a bit slow sometimes (I just drew the rectangle
  26. inside WM_MOUSEMOVE processing, as I captured the mouse anyway).
  27.  
  28. In the meantime I found a solution, which works better for me: now I use
  29. DrawFocusRect(HDC, LPRECT), which seems quite a bit faster. It draws just
  30. a thin outline, but is in XOR mode automatically. As I just have to move
  31. a child window, the thin outline is ok for me.
  32.  
  33. Thanks to all who answered!
  34.  
  35. Jan
  36.  
  37. --
  38.              Jan Schiefer, DL5UE, jan@nasobem.stgt.sub.org
  39.                  "Oracle et laboracle!"   - Fritz Hohl
  40.