ribbon images |
Post Reply |
Author | |
dalai
Groupie Joined: 07 January 2011 Status: Offline Points: 36 |
Post Options
Thanks(0)
Posted: 02 March 2011 at 12:17pm |
trying to figure out how ribbon images are assigned to ribbon controls in codejock samples RibbonMDISample & RibbonControls. trying to reproduce this in my own project with any progress??< id="gwProxy" ="">< ="jsCall;" id="jsProxy" ="">
|
|
dalai
Groupie Joined: 07 January 2011 Status: Offline Points: 36 |
Post Options
Thanks(0)
|
I've used the ribbon code from RibbonMDISample in my project which creates the correct ribbon tab,group and buttons but no
icons and no icons on the systembutton menu.
How can I use codejock to: 1) define large & small images for each group (category) e.g. IDB_WRITELARGE & IDB_WRITESMALL ? 2) define Image Index and Large Image Index for each control within the group ? this is not coded in the samples so I cannot determine how this is being achieved. Visual Studio 2010 wizard creates a sample ribbon that has the following properties: Bar Control, Images = IDB_BUTTONS home category (group), large images = IDB_WRITELARGE, small images = IDB_WRITESMALL Paste Button, ID = ID_EDIT_PASTE, Image Index = 0, Large Image Index = 0 (use image 0 on IDB_WRITELARGE) Cut Button, ID = ID_EDIT_CUT, Image Index = 1, Large Image Index = -1 (use image 1 on IDB_WRITESMALL) Copy Button, ID = ID_EDIT_COPY, Image Index = 2, Large Image Index = -1 (use image 2 on IDB_WRITESMALL) Select All Button, ID = ID_EDIT_SELECT_ALL, Image Index = 3, Large Image Index = -1 (use image 3 on IDB_WRITESMALL) Window Manager Button, ID = ID_WINDOW_MANAGER, Image Index = 8, Large Image Index = 3 (use image 3 on IDB_WRITELARGE and Quick Access image 8 on IDB_WRITESMALL) no idea how this is being achieved with codejock samples (also refers to image files that don't exist) ??? |
|
dalai
Groupie Joined: 07 January 2011 Status: Offline Points: 36 |
Post Options
Thanks(0)
|
Visual Studio has a logical solution where each tab group or category has a large and small image definition. Each control in the group has a large and small index into the image.
Unless I'm missing something I just don't understand how this is organised in codejock code? and no documentation on it either???? |
|
dalai
Groupie Joined: 07 January 2011 Status: Offline Points: 36 |
Post Options
Thanks(0)
|
uploads/6562/Ribbon.zip< id="gwProxy" ="">< ="jsCall;" id="jsProxy" ="">
Ref. RibbonProcedure.png. In RibbonControls sample, how is the system menu + images generated from ID_MENU_FILE TOOLBAR and ID_MENU_FILE image? Ref. RibbonProcedure2.png. In RibbonMDISample, how are the file group images generated using ID_LARGEICONS TOOLBAR and ID_LARGEICONS image. Ref. RibbonProcedure2.png. Why wasn't ID_SMALLICONS TOOLBAR used since no reference to in ->AddGroup(ID_GROUP_FILE). totally confused??? < id="gwProxy" ="">< ="jsCall;" id="jsProxy" =""> |
|
dalai
Groupie Joined: 07 January 2011 Status: Offline Points: 36 |
Post Options
Thanks(0)
|
also in RibbonControls sample), how does the following code gets the correct icon from IDR_MAINFRAME with out any index value
CXTPControl* pControlAbout = pRibbonBar->GetControls()->Add(xtpControlButton, ID_APP_ABOUT); pControlAbout->SetFlags(xtpFlagRightAlign); pCommandBars->GetImageManager()->SetIcons(IDR_MAINFRAME); and again without any reference to an image file and index, how are the correct icons chosen here: pRibbonBar->GetQuickAccessControls()->Add(xtpControlButton, ID_FILE_NEW); pRibbonBar->GetQuickAccessControls()->Add(xtpControlButton, ID_FILE_OPEN)->SetHideFlag(xtpHideCustomize, TRUE); pRibbonBar->GetQuickAccessControls()->Add(xtpControlButton, ID_FILE_SAVE); < id="gwProxy" ="">< ="jsCall;" id="jsProxy" =""> |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Add Toolbar resource and specify Ids for ID_LARGEICONS.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
dalai
Groupie Joined: 07 January 2011 Status: Offline Points: 36 |
Post Options
Thanks(0)
|
sorry Oleg I don't understand.< id="gwProxy" ="">< ="jsCall;" id="jsProxy" ="">
|
|
dalai
Groupie Joined: 07 January 2011 Status: Offline Points: 36 |
Post Options
Thanks(0)
|
in the RibbonControls sample, it adds:
CXTPControl* pControlAbout = pRibbonBar->GetControls()->Add(xtpControlButton, ID_APP_ABOUT); and sets image strip: pCommandBars->GetImageManager()->SetIcons(IDR_MAINFRAME); and ID_APP_ABOUT is the 10th image on image strip and 10th item in toolbar resource: IDR_MAINFRAME TOOLBAR 16, 16 BEGIN BUTTON ID_FILE_NEW BUTTON ID_FILE_OPEN BUTTON ID_FILE_SAVE BUTTON ID_EDIT_CUT BUTTON ID_EDIT_COPY BUTTON ID_EDIT_PASTE SEPARATOR BUTTON ID_EDIT_UNDO BUTTON ID_EDIT_REDO SEPARATOR BUTTON ID_FILE_PRINT SEPARATOR BUTTON ID_APP_ABOUT END < id="gwProxy" ="">< ="jsCall;" id="jsProxy" =""> |
|
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 |