Print Page | Close Window

CXTPTaskDialog and SetResourceFile

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=13700
Printed Date: 27 April 2024 at 5:37pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPTaskDialog and SetResourceFile
Posted By: zitz
Subject: CXTPTaskDialog and SetResourceFile
Date Posted: 16 March 2009 at 4:18am
I use Xtreme ToolkitPro v13.0.0
If load resource dll
XTPResourceManager()->SetResourceManager( new CXTPResourceManager() );
XTPResourceManager()->SetResourceFile( _T("ToolkitPro.ResourceEn.dll") );

or any other resource dll from Xtreme ToolkitPro v13.0.0\Utils\Translations
then
CXTPTaskDialog dlgMessage( this );
dlgMessage.SetWindowTitle( _T("Information") );
dlgMessage.SetMainInstruction( _T("Error") );
dlgMessage.SetMainIcon( TD_ERROR_ICON );
dlgMessage.AddButton( _T("OK", IDOK );
dlgMessage.SetDefaultButton( IDOK );
dlgMessage.EnableCancellation();
dlgMessage.DoModal();

CXTPTaskDialog is showing without icon!
ASSERT(hNewIcon != NULL);
hNewIcon = XTPResourceManager()->LoadIcon(MAKEINTRESOURCE(dwID), sizeIcon);

Please help!!!
What to do to fix this?



Replies:
Posted By: Oleg
Date Posted: 16 March 2009 at 8:09am

Hi,

Do you build statically ?


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: zitz
Date Posted: 16 March 2009 at 8:10am
Yes, i build statically.

If i comment
//XTPResourceManager()->SetResourceFile(...
icon is show ok



Posted By: zitz
Date Posted: 16 March 2009 at 3:27pm
I use the same code at Xtreme ToolkitPro v11.2.0 and it's work fine.
I make a multilingual application and need to localize Codejock dialogs.


Posted By: Oleg
Date Posted: 17 March 2009 at 3:23am
Thanks, I see.
 
thing that these dlls don't have binary resources by default. You can modify Workspace\Resource\ResourcePackage.h  and remove "_XTP_NO_BINARY_RESOURCES" and rebuild dlls.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: zitz
Date Posted: 18 March 2009 at 3:56am
These icons do not change depending on the language, why would they get from a language dll?
I set SetUseSysIcons( TRUE ) - it decided my problem.
Many problems can be obtained using a language dll without binary resources?


Posted By: Oleg
Date Posted: 18 March 2009 at 9:41am
Hi,
 
Seems with static build it can be problem with all binary resources. :(  Suggest to add them anyway.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net