🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #1646

What don't I understand about ComboBoxes?

#1646
From: James R Vallino
Date: Thu, 14 Mar 1991 18:37
34 lines
2096 bytes
I am starting to learn Windows code development using the Petzold book and
the SDK.  I am using the first version of the book which I have had for a
while.  The discussion of controls does not include ComboBoxes since these
were added in Windows 3.0.  I decided to try modifying one of the programs
which used a List box to use a ComboBox instead.

The 'head' program in the book creates two child windows in the client area:
one static to display a file name, and the other as a List box of file names.
I changed the List Box to a Combo box.  The program more or less works (I
still don't quite have the keyboard interface functioning correctly.)  but
there is something weird which I do not understand.

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
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 combo box window was created with the following style:

    WS_CHILD | WS_VISIBLE | CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_BORDER

Is there something else which I need to do to keep the combo box all
together?

Thanks for any help!

--
Jim Vallino	Siemens Corporate Research, Inc., Princeton, NJ
jrv@demon.siemens.com
princeton!siemens!demon!jrv
(609) 734-3331
Technical Details
Message-ID: <55579@siemens.siemens.com>
Path: arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!caen!uflorida!gatech!udel!princeton!siemens!demon!jrv

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!caen!uflorida!gatech!udel!princeton!siemens!demon!jrv
From: jrv@demon.siemens.com (James R Vallino)
Newsgroups: comp.windows.ms.programmer
Subject: What don't I understand about ComboBoxes?
Message-ID: <55579@siemens.siemens.com>
Date: 14 Mar 91 18:37:23 GMT
Sender: news@siemens.siemens.com
Reply-To: jrv@demon.siemens.com
Organization: Siemens Corporate Research, Inc.
Lines: 34