Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!jarthur!elroy.jpl.nasa.gov!hacgate!ashtate!dbase!awd From: awd@dbase.A-T.COM (Alastair Dallas) Newsgroups: comp.windows.ms Subject: StillDown(), children, XOR mode Keywords: Mac-->Windows learning curve Message-ID: <697@dbase.A-T.COM> Date: 5 Sep 90 18:24:50 GMT Organization: Ashton Tate Development Center Glendale, Calif. Lines: 39 I'm having all kinds of fun adapting my Macintosh skills to programming Windows 3.0 (I think there are a lot of us doing that just now). I ran into a slight problem and I thought I'd see what the net says. I'm writing an application that wants to drag a line around the screen. So, when the window gets a WM_LBUTTONDOWN message, I call a routine which tracks the mouse and repeatedly draws this line in XOR mode. On the Mac, that would be something like: PenPat(patXOR); while (StillDown()) { MoveTo(...); LineTo(...); } (more or less--much detail eliminated) Imagine my surprise to find nothing like StillDown() in the Windows API. Fine, I thought, I'll suffice with something like Button(). But it's not there, either. I ended up using PeekMessage(...WM_LBUTTONUP, WM_LBUTTONUP...). First question: is this the preferred StillDown() approach? Second question. What I'm doing is changing the size of two tiled child windows. I have a parent window which is split horizontally by the two child windows. I want the user to drag the line which divides the child windows and thus change the size of both children simultaneously (since tiling is a given). My problem is that the event is in reference to the parent window (mouse movement can occur in either child window). However, getting the DC for the parent and trying to draw there is apparently drawing invisibly _behind_ the children. Which leads me to my third and final question. I'm setting the ROP2 code to the first XOR mode I came to. Is it possible I'm not getting any output because my mode is invisible? Thanks in advance for any help or advice. /alastair/