hi, i'm using vs2010 and have an MFC app with a ribbon bar
i'm using CMFCRibbonSlider but i think this is a general question for any ribbon control
i would like to change the look of the slider. i'm using it as a volume control slide and want the slider part to look like a stretched out triangle (like vlc's volume control) and the zoom buttons to look like small speaker and big speaker
normally i would make a derived class from CMFCRibbonSlider and override OnDrawRibbonSliderZoomButton for example but all the controls in my app are created like this
m_wndRibbonBar.Create(this);
m_wndRibbonBar.LoadFromResource(IDR_RIBBON);
from the resources so i have no way that i can think of to change any of the behavior of the control.
do you think there is a way to somehow add your own customs controls to the ribbon and still use the ribbon designer vs. creating the ribbon programmatically?
for example, suppose i get the crate do its job but after creating i somehow override CMFCRibbonSlider::OnDraw(CDC* pDC) and point it to my own version of CMFCRibbonSlider::OnDraw(CDC* pDC)where i can do whatever i want.
it this legitimate c++ programming? how would one override a class at runtime?
P.S. i tried simply writing my own On Draw function
void CMFCRibbonSlider::OnDraw(CDC* pDC)
{
TRACE("this is my CMFCRibbonSlider::OnDraw\n");
}
which compiles (strangely) but does not get called
[edit: moved form answer]
The question is: How to get the ribbon designer to recognize the new class?
[/end of edit]