AddColorTableMenu


void AddColorTableMenu( CMenu *menu, UINT startVal = IDS_COLORTABLE_START );

Parameters

Description

This function will add a series of menu items containing the text for the available color tables (obtained from a string resource) to the menu. The menu should be created using CreatePopupMenu. Before adding the menu to your menu, you may want to detach it. The code below shows an example of what an initialization might look like (see the example project in MainFrm.cpp):

	CMenu		*menu, newMenu;
	HMENU		hMenu;

	menu = this->GetMenu();
	newMenu.CreatePopupMenu();

	AddColorTableMenu( &newMenu );
	hMenu = newMenu.Detach();
	menu->ModifyMenu( ID_PLOTSETTINGS_COLORTABLE, MF_POPUP | MF_BYCOMMAND, (UINT) hMenu, "Color Table" );
Here, ID_PLOTSETTINGS_COLORTABLE is the menu item where the color table should be added to.


CColorControl Reference | CPlot Reference