![]() |
Foreign resource issue in ribbon sample |
Post Reply ![]() |
Author | |
chimpy ![]() Groupie ![]() ![]() Joined: 10 March 2009 Status: Offline Points: 18 |
![]() ![]() ![]() ![]() ![]() Posted: 21 March 2012 at 5:11am |
I've been having a play with the CodeJock ribbon sample and decided to try out the foreign resources. In CMainFrame's constructor I added the following
XTPResourceManager()->SetResourceFile (resource_dll_path); where resource_dll_path is a string set to the path of ToolkitPro.ResourceSv.dll When I bring up the ribbon customise dialog, I find I can't click on the 'Customize Ribbon' button on the left of this dialog. If I change resource_dll_path to point to the .xml version of this fine everything works as expected. It doesn't seem to matter what language .dll file I choose either. I did wonder if the presence of a XTPCoreTree custom control in the resource file was causing the issue XTP_IDD_RIBBONCUSTOMIZE_RIBBON DIALOGEX DISCARDABLE 0, 0, 452, 227 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_CAPTION CAPTION "Customize &Ribbon" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Customize the Ribbon",XTP_IDC_RIBBONPAGE_TITLE,14,7,284, 22 LTEXT "&Choose commands from:",IDC_STATIC,18,34,106,8 COMBOBOX XTP_IDC_RIBBONCOMBO_CATEGORIES,18,45,164,85, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "",XTP_IDC_RIBBONLIST_COMMANDS,"XTPCoreTree",WS_TABSTOP, 18,65,164,145,WS_EX_CLIENTEDGE PUSHBUTTON "&Add >>",XTP_IDC_RIBBONBUTTON_ADD,190,109,52,14 PUSHBUTTON "<< &Remove",XTP_IDC_RIBBONBUTTON_REMOVE,190,126,52,14 LTEXT "&Customize the Ribbon:",XTP_IDC_RIBBONSTATIC_CUSTOMIZE, 249,34,106,8 COMBOBOX XTP_IDC_RIBBONCOMBO_TABGROUP,248,45,164,85, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "",XTP_IDC_RIBBONLIST_QUICKACCESS,"XTPCoreTree", WS_TABSTOP,249,65,164,98,WS_EX_CLIENTEDGE PUSHBUTTON "Ne&w Tab",XTP_IDC_RIBBONBUTTON_NEWTAB,249,168,52,14 PUSHBUTTON "&New Group",XTP_IDC_RIBBONBUTTON_NEWGROUP,305,168,52,14 PUSHBUTTON "Rena&me",XTP_IDC_RIBBONBUTTON_RENAME,361,168,52,14 PUSHBUTTON "",XTP_IDC_RIBBONBUTTON_UP,422,109,21,14 PUSHBUTTON "",XTP_IDC_RIBBONBUTTON_DOWN,422,126,21,14 LTEXT "Customizations:",XTP_IDC_RIBBONSTATIC_CUSTOMIZATIONS, 251,188,50,8 PUSHBUTTON "Re&set",XTP_IDC_RIBBONBUTTON_RESET,305,186,52,14 PUSHBUTTON "Im&port/Export",XTP_IDC_RIBBONBUTTON_IMPORT,305,203,77, 14 END Not sure. Anyone else seen this and got a workaround (apart from using the .xml file instead).
|
|
Product: Xtreme ToolkiPro version 13.2.0
Platform: Windows XP (32bit) - SP 2 Language: C++ |
|
![]() |
|
chimpy ![]() Groupie ![]() ![]() Joined: 10 March 2009 Status: Offline Points: 18 |
![]() ![]() ![]() ![]() ![]() |
Well, seeing as though no-one has replied yet, either through the forum or via a support ticket, I thought I'd have a go at fixing it myself :) Turns out if you want to provide your own customise sheet that's derived from CXTPPropertySheet (like in the samples), you need to provide an override for AddPage void CustomisePropertySheet::AddPage(CXTPPropertyPage* pPage,
int nIndex)
LPCDLGTEMPLATE pResource
= XTPResourceManager()->LoadDialogTemplate((UINT)(UINT_PTR)pPage->m_psp.pszTemplate);
if (pResource) {
pPage->m_psp.pResource = pResource;
pPage->m_psp.dwFlags |= PSP_DLGINDIRECT; } } |
|
Product: Xtreme ToolkiPro version 13.2.0
Platform: Windows XP (32bit) - SP 2 Language: C++ |
|
![]() |
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 |