Professional UI Solutions
Site Map   /  Register
 
 

Forum

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 General Discussion » CExtColorPicker Collapse All
Subject Author Date
Ian McIntosh Jan 30, 2009 - 2:55 AM

Hi,


I want to use the CExtColorButton to implement a color picker, but I want to be able to set the available colors.


Can I do this, and if so how?


thanks


also I tried to raise this a few days ago in the Support forum but got a message access denied. My subscription was recently renewed but it doesn’t seem to have been updated on my account.

Ian McIntosh Feb 2, 2009 - 3:32 AM

The Popup menus page doesn’t appear to have any color pickers on it all all, so I don’t understand what your suggesting.


I need to be able to set the colors dynamically. For example, I may have a set of, say, 20 colors that are valid for the user to select and want to make those available using the color picker, rather than the colors that are available by default.


Look at the Buttons page as an example. There is a button labelled color. If I press that it displays a color picker, with a set of colors shown. I want to be able to do something similar, but to set the colors that are shown.


I can see a class CExtColorPalletteWnd that looks like it allows setting of colors through CpwColorArraySet(). I’m not sure if a CExtColorButton causes a CExtColorPalletteWnd to be created, but if it does how can I get access to it to change the colors (and if not, what do I do instead to set the colors)?

 


Technical Support Feb 3, 2009 - 12:36 PM

The following screenshot demonstrates what you are looking for:

http://www.prof-uis.com/download/forums/CustomColorPaletteInColorPopupMenu.png

Then you should handle the CExtPopupMenuWnd::g_nMsgPrepareMenu registered message as it is demonstrated in the CPagePopupMenus::OnExtMenuPrepare() method in the ProfUIS_Controls sample application. To handle this message in the CExtButton-derived class you should implement the CWnd::WindowProc() virtual method because the CExtButton::WindowProc() method resends the CExtPopupMenuWnd::g_nMsgPrepareMenu registered messages to button’s parent window.

Technical Support Feb 1, 2009 - 11:40 AM

Please tell us what colors you need? The ProfUIS_Controls sample application demonstrates different color popup sub menus on the Popup Menus dialog page. Is that what you you are looking for?