1. I want to change the caption,tooltip and description by using XML code.
2. I found ActionSample.
3. so I used below code.
======================================================================================================
After Ribbon CommandBar loading( CommandBar designer ) xml or xcb, Added below code.( i also called AfxOleInit() )
CXTPPropExchangeXMLNode px2(TRUE, 0, _T("Settings"));
if (px2.LoadFromFile(_T("res\\Actions.ENG.xml")))
{
XTP_COMMANDBARS_PROPEXCHANGE_PARAM param;
param.bSaveOriginalControls = FALSE;
param.bSerializeControls = FALSE;
param.bSerializeOptions = FALSE;
param.bSerializeLayout = FALSE;
param.bSerializeActions = TRUE;
GetCommandBars()->DoPropExchange(&px2, ¶m);
pCommandBars->RedrawCommandBars();
}
======================================================================================================
Actions.ENG.xml is below.
<?xml version="1.0" encoding="EUC-KR"?>
<Settings CompactMode="1">
<Actions Enabled="1">
<Action Id="1023" Caption="Normal_Button" TooltipText="Button Tooltip" DescriptionText="This is Discrption"/> // This is Ribbon Button. It works fine.
<Action Id="1027" Caption="Home_Tab" KeyID="ID_HOME"/> // This is Ribbon Tab. This code doesn't work.
<Action Id="1028" Caption="Home_Group1" KeyID="ID_HOME_Group1"/> // This is Ribbon Home Group. This code doesn't work.
</Actions>
</Settings>
======================================================================================================
I added 2lines(red color), But it doesn't work.
What's the Problem?
|