Click here to Skip to main content
15,916,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have made a custom combobox by overriding its DrawItem() function. I also use WM_CTLCOLORLISTBOX and getting hWnd to listbox in lParam and settting it my listbox. ListBox drawing is done in DrawItem().

Now the problem is when there are many items in the listbox and a scrollbar is required. The scrollbar is not shown, actually it's there but it is only drawn when user clicks into the scrollbar area. It will be helpful if someone could suggest how I can get scrollbar events for the combobox or listbox.

Is there any solution to that, please help.
Posted
Updated 15-May-10 22:25pm
v2
Comments
Jörgen Sigvardsson 4-Aug-10 11:52am    
Sounds like you are drawing outside the item boundaries. Are you using the item rectangles provided by MFC?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900