WS_HSCROLL for a list box
Kajal Mpls -- kajalc@msgate.apertus.com Monday, May 20, 1996 Environment: NT 3.51, VC++ 2.0 ------------------------------------------------- Does anybody know if I can tell that a WS_HSCROLL style has been set for a CListBox or any window before it has been activated? ( i.e not using the GetStyle () to get the current style ). Thanks, Kajal
Frederic Steppe -- FredericS@msn.com Wednesday, May 22, 1996 >Environment: NT 3.51, VC++ 2.0 > >Does anybody know if I can tell that a WS_HSCROLL style has been set for a >CListBox or any window before it has been activated? ( i.e not using the >GetStyle () to get the current style ). Either specify it in the dialog template (or check the 'Horizontal scroll' box in dialog editor's style page) if your listbox is created from a dialog resource, or set the needed styles in the first parameter of CListBox::Create if you create the listbox 'by hand'. Example : In .RC file (dialog resource) LISTBOX IDC_MY_LIST,4,34,338,117,LBS_USETABSTOPS | WS_HSCROLL | WS_TABSTOP In .CPP file (by hand) MyListBox.Create(WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_TABSTOP | LBS_USETABSTOPS, MyRect, pWnd, IDC_MY_LIST); Frederic Steppe (frederics@msn.com)
| Вернуться в корень Архива |