Search code examples
visual-studiovisual-c++mfctoolkit

Add a image to RadioButton in a ListBox


I have a List Box hwich is modified in a such a way that each row will have Radiobutton .Now my requirement is each of these Radio button must have a bitmap image followed by some text . i have codejock xtremetoolkit 13.4.0 installed . I am new to UI design and xtreme toolkit.Can any one help me out please.


Solution

  • You have to make the listbox owner drawn and then overload the WM_PAINT message for Radiobutton so that the picture and text can be painted. For more information on owner drawn list box see this link: CListBox::DrawItem

    For more information on owner drawn button see this link: CButton::DrawItem

    Hope this helps!