Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » How to set the color for Default button in the color selection popup menu. Collapse All
Subject Author Date
Neville Franks Apr 3, 2009 - 2:42 PM

I have a color menu on a toolbar button set as follows:



How do I set the color that is used when the "Default" button is pressed. CExtPopupColorMenuWnd has m_clrDefault but I can’t see how to set that and reading the documentation hasn’t provided an answer.



Technical Support Apr 4, 2009 - 1:45 PM

Please implement the CExtCustomizeSite::OnColorItemValueGet() virtual method in your main frame class as it is demonstrated in the CMainFrame::OnColorItemValueGet() method in the DRAWCLI sample application. If the bSelected parameter is true, the method should save the current selected color of the color button into the clr reference parameter. If the bSelected parameter is false, then the method should save the COLORREF(-1L) color value. So, when the CMainFrame::OnColorItemValueSet() method is invoked, then its clr parameter is COLORREF(-1L) if the Default button was pressed in the color popup menu.