CMFCRibbonButton with custom width
-
I want to Create CMFCRibbonButton control with custom width independent of it's caption length. and even I want know if I could change their width dynamically (at running time)
Try
CMFCRibbonBaseElement::Get/SetRect(..)
:) To my intuition it should be used at creation time, or you will call something like "ReAdjustLayout" for the parent bar/pane after the setting of the rectangle at RT... :)virtual void BeHappy() = 0;
-
Try
CMFCRibbonBaseElement::Get/SetRect(..)
:) To my intuition it should be used at creation time, or you will call something like "ReAdjustLayout" for the parent bar/pane after the setting of the rectangle at RT... :)virtual void BeHappy() = 0;
It was so surprising to me when i found that actually these two methods (CMFCRibbonBaseElement::SetRect and CMFCRibbonBaseElement::GetRect) do nothing, even after creating your ribbon element and put it in the ribbon menu you can't retrieve the dimensions of your element with CMFCRibbonBaseElement::GetRect and the only thing it gives is a rect object with zero dimentions :doh: