Ownerdrawn Listbox
-
Hi, I'm looking for a way to do a completely owner-drawn Listbox in C++ with just the Windows API and without MFC. The LBS_OWNERDRAWFIXED allows me to draw the items in the list, but is there a way for me to owner-draw the entire listbox (along with the scroll bars, etc)? Or do I have to subclass the listbox and draw it when it receives WM_PAINT? Thanks!
KR
-
Hi, I'm looking for a way to do a completely owner-drawn Listbox in C++ with just the Windows API and without MFC. The LBS_OWNERDRAWFIXED allows me to draw the items in the list, but is there a way for me to owner-draw the entire listbox (along with the scroll bars, etc)? Or do I have to subclass the listbox and draw it when it receives WM_PAINT? Thanks!
KR
-
Well owner draw does what it does. You can't make it do something it doesn't do. Does that answer your question?
led mike
-
I was hoping there was a listbox ownerdraw style that would have the same behavior as BS_OWNERDRAW does for buttons. I guess you're saying there isn't one?
KR
-
KellyR wrote:
I guess you're saying there isn't one?
Yes. As far as I know there is only one owner draw mechanism for each control that supports owner draw.
led mike
-
Hi, I'm looking for a way to do a completely owner-drawn Listbox in C++ with just the Windows API and without MFC. The LBS_OWNERDRAWFIXED allows me to draw the items in the list, but is there a way for me to owner-draw the entire listbox (along with the scroll bars, etc)? Or do I have to subclass the listbox and draw it when it receives WM_PAINT? Thanks!
KR
With a listview control, you could maybe take advantage of custom draw... Customizing a Control's Appearance Using Custom Draw[^] Mark
Mark Salsbery Microsoft MVP - Visual C++ :java: