Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ComboBox button width

18 views
Skip to first unread message

FDW

unread,
May 1, 2003, 3:52:28 AM5/1/03
to
All,

For automated layout purposes I need to be able to change/set the width of
the button that is associated with a combobox. Checking the child windows of
the combobox I can only find the handle for the embedded edit object and not
the pushbutton. Any advice on this one?

Frans

Igor Kaliniak

unread,
May 1, 2003, 8:42:08 AM5/1/03
to
Frans,

> For automated layout purposes I need to be able to change/set the width of
> the button that is associated with a combobox.

I'm afraid, no chances. Only owner-drawn CB.

Igor


FDW

unread,
May 1, 2003, 10:13:00 AM5/1/03
to

Igor,

Thanks for the response, Yes I was starting to think that, there is no
information on this in the MSDN doc the KnowledgeBase and the book from
Petzold ( or the Windows API bible ). But still: If any one has some info
please let me know ;-)

Frans

"Igor Kaliniak" <rem4i...@gal.ukrpack.net> wrote in message
news:3eb11...@news.ukrpack.net...

Karl-Heinz Rauscher

unread,
May 1, 2003, 11:55:51 AM5/1/03
to
Frans,

there愀 no such handle, and i bet ( 99,9 % <g> ) that MS itself draws this
little button using the DrawFrameControl() api. Here愀 a sample to emulate
such a combobox button ( in disabled mode )

DrawFrameControl( hdc , @sRect, DFC_SCROLL , _or ( DFCS_SCROLLCOMBOBOX ,
DFCS_INACTIVE ) )

If you want to switch to ownerdraw - as Igor suggests - be warned. Ownerdraw
and combos doesn愒 mean that you愉e able to draw this little button within a
drawing cycle. combobox ownerdraw means that you *only* get the rectangle of
the current item that needs to be paint. If you愉e interested, there愀 a
combobox ownerdraw sample on my website.

If you really want to continue with your idea i would try to do this based
on a customcontrol. Use DrawFrameControl() to paint the arrow, and if you
need to "open" the control show a headerless listview or a listbox.


--
regards
Karl-Heinz

CULE - the easier C#, the smarter VO

http://people.freenet.de/KHRauscher/


FDW

unread,
May 1, 2003, 11:56:22 AM5/1/03
to
Karl-Heinz

Many thanks for the response, I will have a look at your sample ( and also
try to think of some alternative way to edit the data ;-)

Frans

"Karl-Heinz Rauscher" <khrauscher_r...@compuserve.com> wrote in
message news:b8rg3k$d2024$3...@ID-61886.news.dfncis.de...

0 new messages