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
> 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
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...
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/
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...