CListBox -- Owner Drawn - (override OnPaint) - Need help, please! 
Author Message
 CListBox -- Owner Drawn - (override OnPaint) - Need help, please!

Hello Jason,

The problem is that OnPaint() function is called by the system to paint the
control and it's item. Just overide this function and draw your own border,
and get the first item that appear in the list box and draw your item like
you do in the OnDrawItem.>...

>  I'm attempting to have a class derived from CListBox which I want to do
>my own OnPaint.  I've overridden the OnDrawItem, and that part is working
>great, but I want to add some things to the top and bottom of the list
>and be able to size it correctly with the Dialog resource editor.  So I
>guess my question is this:

>HOW do you get access to the items in the list box from the OnPaint to
>them to the OnDrawItem function -- since if I put the borders that I
>and don't call CListBox::OnPaint, none of the items are painted
>-- but if I DO call CListBox::OnPaint, it paints over my borders
>(obviously).  What I want is a way to get the Items out and not HAVE to
>call OnPaint.

>  I'd also like a way to make my own list box sort (which I guess I can
>if I can figure out how to do the OnPaint override.)

>  If you have any ideas, or know how to do it, please e-mail me


Sun, 12 Dec 1999 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Please Help: OnPaint(), drawing in an Edit box

2. Owner Drawn List Box - URGENT Please HELP!!!

3. Owner Drawn List Box - URGENT Please HELP!!!

4. Please Help me with Owner Draw Controls

5. Newbie to owner drawn: Scroll Bars in Owner drawn ListCtrl

6. owner drawn combobox overrides???

7. Overriding MeasureItem function for a Owner Drawn Menu

8. Owner Drawn CListBox

9. DataTip in owner draw CListBox

10. CListBox Owner Draw Problems

11. Owner Draw CListCtrl/CListBox question

12. CListBox Owner Draw - Horizontal Scroll Bar not appearing


Powered by phpBB® Forum Software