Newsgroups: comp.windows.ms.programmer
Path: utzoo!news-server.csri.toronto.edu!utgpu!watserv1!sunee!gpsteffl
From: gpsteffl@sunee.waterloo.edu (Glenn Patrick Steffler)
Subject: Re: What don't I understand about ComboBoxes?
Message-ID: <1991Mar18.010330.10326@sunee.waterloo.edu>
Organization: Gold Disk Inc.
References: <55579@siemens.siemens.com>
Date: Mon, 18 Mar 1991 01:03:30 GMT
Lines: 35

In article <55579@siemens.siemens.com> jrv@demon.siemens.com writes:
>If the list box is dropped down under the edit box, and I move the window on
>the screen everything except the list box part of the combo box moves.  I

Ha ha ha ... this little doozy hit me a little while ago whilst writing
a window class handler for half-height cations, and 3-d boders around
the window.  I was capturing every WM_NC* message known to DefWindowProc
in order to acheive this (daunting) task.  Unfortunately, after placing
a combobox control in one of these windows the above happened. (anyway,
I digress...)

Solution:
Trap WM_SYSCOMMAND, and place a SetActiveWindow (handle of window passed in)
n the SC_MOVE case.  Worked fine for me...and even works when the
application moves the window with a SetWindowPos() call.

>can slide the window right out from under the list box.  If the window is
>minimized the list box is removed but when brought back the list box is in
>the same place outside of the client area of its parent window.  Why does
>this control seem to break up into multiple parts?  Shouldn't it all at
>least stay within the client area of the control's parent?

The dialog box handles the messages to allow the combo box to operate
correctly.  DefWindowProc does not provide this functionality.  Done.

>Jim Vallino	Siemens Corporate Research, Inc., Princeton, NJ
>jrv@demon.siemens.com
>princeton!siemens!demon!jrv
>(609) 734-3331

-- 
Co-Op Scum                            "Bo doesn't know software" - George Brett

"The galaxial hearth steams the sea as the sky blood red embrasses darkness"
-John Constantine (HellBlazer)                          Glenn Steffler
