![]() |
I hope to chage icon on commandbar |
Post Reply ![]() |
Author | |
copycdx2 ![]() Groupie ![]() Joined: 17 September 2008 Status: Offline Points: 20 |
![]() ![]() ![]() ![]() ![]() Posted: 04 March 2009 at 3:03am |
first, load prestate.
LoadCommandBars(XTP_REG_TOOLBAR);
I use commandbars with icon.
below code.
pCommandBars->GetImageManager()->SetIcon( IDI_NC_LOGIN, IDI_NC_LOGIN );
pCommandBars->GetImageManager()->SetIcon( IDI_NC_LOGOUT, IDI_NC_LOGOUT ); I hope to change icon in order to display toggle-state.
but, iconimage is not change.
CXTPCommandBars* pCommandBars = GetCommandBars();
if(pCommandBars == NULL) { TRACE0("Failed to create command bars object.\n"); return; // fail to create } CXTPToolBar* pToolBar = (CXTPToolBar*)pCommandBars->GetToolBar(IDR_TOOLBAR_NC02); RecalcLayout(FALSE); |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Code looks right. Are you sure you call it after LoadCommandBars ? pCtrl not NULL ?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |