Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set ComboBox dropped width

Status
Not open for further replies.

MikeCox

Programmer
Jun 4, 2001
340
US
Hi!

I need to set the list portion of a combobox to wider than the control itsself. My book tells me the API SendMessage can widen the list portion of a combo box with a call like this:

------------------------------------
SendMessage Combo1.hWnd, CB_SETDROPPEDWIDTH, 300, 0
------------------------------------

The problem is my API viewer cannot find the constant CB_SETDROPPEDWIDTH, and scrolling through the CB_ series constants available (win32api.txt, apiload.txt, and mapi32.txt), I can't find anything that remotely looks like what I need. I really don't want to move a listbox in place if I don't have to. Does anyone know how I can declare CB_SETDROPPEDWIDTH to make this happen? Or is there another API now that I need to use?

Thank you!

-Mike
Any man willing to sacrifice liberty for security deserves neither liberty nor security.

-Ben Franklin
 
This was answered in another thread. In case anyone else is interested, it is:

Const CB_SETDROPPEDWIDTH As Long = &H160

-Mike
Any man willing to sacrifice liberty for security deserves neither liberty nor security.

-Ben Franklin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top