[comp.windows.ms] How do you get a horizontal scrollbar in a listbox?

gn@logm.se (Gert N) (09/12/90)

Has anybody succeeded in creating a listbox with a horizontal
scrollbar? In our application the strings in the listbox can be long
and we want to scroll horizontally.

When I create the listbox I set the window style to
WS_CHILD | WS_VISIBLE | LBS_NOTIFY | WS_VSCROLL | WS_HSCROLL .

It seems that WS_HSCROLL has no effect. The SDK documentation
says it should be possible. Any clues?


Gert Nilsson
TELESOFT AB
Box 4148
S-203 12 Malmoe
Sweden

pnl@hpfinote.HP.COM (Peter Lim) (09/14/90)

> 
> When I create the listbox I set the window style to
> WS_CHILD | WS_VISIBLE | LBS_NOTIFY | WS_VSCROLL | WS_HSCROLL .
> 
> It seems that WS_HSCROLL has no effect. The SDK documentation
> says it should be possible. Any clues?
> 
In my limited MS Windows SDK knowledge, I think Windows will automatically
hide the horizontal scroll bar until you have a line of text or graphics
which is wider than the window width. So, you code could be working
all along. May be try to manual size your window to very narrow and see
if the horizontal scroll bar appear.


Regards,                       ## Life is fast enough as it is ........
Peter Lim.                     ## .... DON'T PUSH IT !!          >>>-------,
                               ########################################### :
E-mail:  plim@hpsgwg.HP.COM     Snail-mail:  Hewlett Packard Singapore,    :
Tel:     (065)-279-2289                      (ICDS, ICS)                   |
Telnet:        520-2289                      1150 Depot Road,           __\@/__
  ... also at: pnl@hpfipnl.HP.COM            Singapore   0410.           SPLAT !


#include <standard_disclaimer.hpp>