![]() |
How can i put my own bitmap on a button |
Post Reply ![]() |
Author | |
vijaymahajan ![]() Groupie ![]() ![]() Joined: 16 June 2008 Status: Offline Points: 92 |
![]() ![]() ![]() ![]() ![]() Posted: 23 June 2008 at 8:07am |
Hello,
How can i put a (32,32 pixel) bitmap images on the button.
you have put a png file in your sample application. i want a full size button as your "insert caption button" under Referrence tab in your ribbonsample application.
currently i am creating a button using this code -
CXTPControl* pcontrol = pGroup1->Add(xtpControlButton, ID_EDIT_NEW1); this bitmap file is 32*32 pixels.But its not working. Please explain me,how can we put out bitmaps on the buttons.
Please guide in detail.
Thanks And regards,
Vijay.
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
See Samples\Ribbon\RibbonControls sample from 12.0 release.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
vijaymahajan ![]() Groupie ![]() ![]() Joined: 16 June 2008 Status: Offline Points: 92 |
![]() ![]() ![]() ![]() ![]() |
i am trying to put a my .bmp file on a button. but its not working.i am doing this way - CXTPRibbonTab* pTabEdit = pRibbonBar->AddTab(_T("Edit"));CXTPRibbonGroup* pGroup1 = pTabEdit->AddGroup(ID_GROUP_TRIAL);CXTPControl* pcontrol = pGroup1->Add(xtpControlButton, ID_EDIT_BTN);pcontrol->SetStyle(xtpButtonIcon);pcontrol->SetWidth(40);pcontrol->SetHeight(60);pCommandBars->GetImageManager()->SetIcon(ID_EDIT_NEW1,ID_EDIT_BTN,CSize(32,32),xtpImageNormal); Here this ID_EDIT_NEW1 is the id of bitmap file.and ID_EDIT_BTN is the id of button created.
Please guide me to put my bitmap files on the button control.
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
SetIcon metohd works only for ico files. you need SetIcons method. See how sample load bitmaps.
|
|
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 |