Which style do I have to use if I want a horizontal scrollbar in a listbox and a combobox? I use WS_VSCROLL and WS_HSCROLL but I can't see the horizontal scrollbar if an entry is too long! But isn't WS_HSCROLL responsive for it?

:( Marwin
Posted on 2002-08-14 06:23:13 by Marwin
You might have to SendMessage or SendDlgItemMessage with LB_SETHORIZONTALEXTENT as the UINT Msg, // message to send.
Posted on 2002-08-14 08:50:19 by gscundiff
Hmm, I tried it with LB_SETHORIZONTALEXTENT but now the scrollbar appears too even when no scrollbar is needed, because the entry isn't too long.

:( Marwin
Posted on 2002-08-15 04:54:40 by Marwin
Find the longest entry with GetTextExtentPoint?
Posted on 2002-08-15 06:20:29 by Qweerdy
No Qweerdy, I don't think so. The GetTextExtentPoint32 function (GetTextExtentPoint is obsolete) seems to works only with device contexts! But what else could I use?
Posted on 2002-08-15 08:08:49 by Marwin
>But what else could I use?

Get the DC of the Listbox? :)
Posted on 2002-08-15 08:16:00 by bazik