[comp.windows.ms.programmer] Static Windows and MoveWindow

whisd@sersun1.essex.ac.uk (Whiteside S D B) (05/22/91)

Can anyone help on this:

I create a static child window during my main window's WM_CREATE section.

I then size it properly when I get a WM_SIZE from Windows.

That all works okay. But then at another point I move the child window again, using MoveWindow. It removes the old static window, but doesn't repaint the new one. I do set the "redraw" field to TRUE.

However when I resize my parent window, the child window becomes visible again.

It seems that resizing the parent window sends extra messages that causes the static child to repaint itself which MoveWindow doesn't.

Can anyone suggest what's happening?

One a more general note: all this message passing seems highly confusing. It seems to go back on the idea that functions should have no side-effects. It's very hard to work out what's happening - what message begets what message etc.. Maybe it's just my first rude introduction to operating system-type programming. But it seems you have to do so much low-level type work to get even simple things to run.

Or am I talking to my grandmother about sucking eggs?

Simon Whiteside (WM_SIMON) 

jeroen_pluimers@f521.n281.z2.fidonet.org (Jeroen Pluimers) (06/02/91)

Hello Whiteside!

In a msg of <22 May 91>, Whiteside S D B writes to All:

 WSDB> One a more general note: all this message passing seems highly
 WSDB> confusing. It seems to go back on the idea that functions should have
 WSDB> no side-effects. It's very hard to work out what's happening - what

Use a utility like SPY (from the windows SDK) to view all messages that reach 
your window. That should help.



jeroen

coates@uc780.umd.edu (06/09/91)

In a previous article, jeroen_pluimers@f521.n281.z2.fidonet.org (Jeroen Pluimers) wrote:
>Hello Whiteside!
> 
>In a msg of <22 May 91>, Whiteside S D B writes to All:
> 
> WSDB> One a more general note: all this message passing seems highly
> WSDB> confusing. It seems to go back on the idea that functions should have
> WSDB> no side-effects. It's very hard to work out what's happening - what
> 
>Use a utility like SPY (from the windows SDK) to view all messages that reach 
>your window. That should help.
> 
> 
> 
>jeroen

Messages provide a way for Windows to have multitasking. Each program has
message queues in Windows for each of its windows. Unless you issue
UpdateWindow(), it's up to Windows on when a program's window will receive
a message
Also it is the backbone of the object orientation for Windows, in that
a programs windows are sent messages and th window does its thing based
on the algorithms and data it has a result of its particualr window process
or function.

***********************************************************************
*                   Elliott Coates, Washington DC                     *
*                                                                     *
*                       coates@uc780.umd.edu                          *
***********************************************************************

coates@uc780.umd.edu (06/10/91)

Also Turbo Debugger allows you to selectively or en masse view messages
to a window procedure.

**************************************************************************
*                     Elliott Coates, washington dc                      *
*                         coates@uc780.umd.edu                           *
*                             coates@uc780.bitnet                        *
**************************************************************************