Print Page | Close Window

CXTPSingletonPointer between EXE and DLLs

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=24430
Printed Date: 14 May 2024 at 11:49am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPSingletonPointer between EXE and DLLs
Posted By: cpede
Subject: CXTPSingletonPointer between EXE and DLLs
Date Posted: 27 September 2023 at 9:32am
I have an EXE file that loads some DLLs.

In the EXE file I define:
CXTPPaintManager::SetTheme(xtpThemeOffice2016);
XTPResourceImages()->SetHandle(_T("MyTheme.dll"), _T("Office2016PowerPointDarkGray.ini"));

when I at some point in the DLL calls:
CXTPPaintManagerColor crHyperlink;
crHyperlink.SetStandardValue(XTPIniColor(_T("GridControl"), _T("HyperLink"), RGB(0, 0, 255)));
it does not use the resources specified in the EXE?

It seems like the "global" CXTPSingletonPointer created in the SetHandle method is not the same used in XTPIniColor. How do I have a true singleton between my EXE and DLLs?


-------------
Product: Xtreme ToolkitPro (22.1.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)



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