Prev: LoadLibrary exception
Next: using lame encoder
From: trs on 17 Dec 2009 15:02 Hi, I'm working on making a splitter window system in pure win32. I have a main window with a child window, and when the main window resizes (I catch the WM_SIZE message in my main window wndproc) I call MoveWindow to resize the child window to maximize it's size within the parent. I have all the styles set like clipping children , etc so there isn't any flicker when the child resizes. I have the option checked to "show window contents while resizing/ dragging", and I on my slower laptop I notice if I grab the lower right hand corner of the main window and expand the window quickly with the mouse, I see part of the gray main window background, then a pause, then the child window "catches up" and paints itself to fill the void. I would like to get rid of this delay so that as the main window resizes the child immediately does too so you don't see any hint of the main window background in the interim. I would greatly appreciate any ideas, thanks.
From: Preben Friis on 17 Dec 2009 17:43 "trs" <stowellt(a)gmail.com> wrote in message news:87a5fbc4-14c9-480f-a89a-1d17cdeb6d73(a)x5g2000prf.googlegroups.com... > I would like to get rid of this delay so that as the main > window resizes the child immediately does too so you don't see any > hint of the main window background in the interim. DeferWindowPos() is the answer you are looking for. http://blogs.msdn.com/oldnewthing/archive/2005/07/06/436043.aspx /Preben Friis
From: trs on 18 Dec 2009 10:37 On Dec 17, 3:43 pm, "Preben Friis" <no...(a)technologist.com> wrote: > "trs" <stowe...(a)gmail.com> wrote in message > > news:87a5fbc4-14c9-480f-a89a-1d17cdeb6d73(a)x5g2000prf.googlegroups.com... > > > I would like to get rid of this delay so that as the main > > window resizes the child immediately does too so you don't see any > > hint of the main window background in the interim. > > DeferWindowPos() is the answer you are looking for. > > http://blogs.msdn.com/oldnewthing/archive/2005/07/06/436043.aspx > > /Preben Friis Thanks for the information, that link is very interesting. So why does the lag happen? Is it because the child window doesn't get the size message until after the parent has already been painted? I thought MoveWindow sent the paint, size, etc messages directly to the child windows wndproc so that's why I'm confused about the delay, thanks.
|
Pages: 1 Prev: LoadLibrary exception Next: using lame encoder |