No scrollbar for Listbox using WinAPI
Can someone please help me out. The scrollbars are missing when I create a listbox using either CreateWindow or CreateWindowEx.
Here is my code below..
hSiteList = CreateWindow("listbox",NULL,WS_CHILD | WS_VISIBLE | WS_BORDER | LBS_HASSTRINGS | LBS_STANDARD| WS_HSCROLL | WS_VSCROLL, 320, 85, 130, 125, hwnd, (HMENU)IDC_SITELIST, hInst, NULL);
OR
hSiteList = CreateWindowEx(NULL,"LISTBOX", NULL, WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL | WS_VSCROLL | LBS_STANDARD, 320, 85, 130, 125, hwnd, (HMENU)IDC_SITELIST, hInst,NULL);
Thanks!
Re: No scrollbar for Listbox using WinAPI
I am not sure about the vertical scroll bars, but for the horizontal
scroll bars I think you need to look at the LB_SETHORIZONTALEXTENT
message.
Re: No scrollbar for Listbox using WinAPI
u should add more numbers of items in the list box then u could see the scroll bars :wave:
Re: No scrollbar for Listbox using WinAPI
u should add more numbers of items in the list box then u could see the scroll bars automatically :wave:
Re: No scrollbar for Listbox using WinAPI
The OP has probably solved this within the past 11-1/2 years!