Print Page | Close Window

CXTPPropertySheet resource problem

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=24268
Printed Date: 18 April 2024 at 10:37am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPPropertySheet resource problem
Posted By: andreypir
Subject: CXTPPropertySheet resource problem
Date Posted: 04 February 2022 at 8:21pm
I need to use CXTPPropertySheet to display property pages implemented in several modules (.dll). However, the way CXTPPropertySheet is implemented it assumes all CXTPPropertyPage objects added to it load their templates from the same module.
CXTPPropertySheet::CreateClient() calls pPage->LoadTemplate() for each page and fails 
if any of them fails. 
CXTPPropertyPage::LoadTemplate() uses a singleton XTPResourceManager() to find the dialog 
template. And so there is no way to set different resource instances for different pages.
A simple solution is to declare CXTPPropertyPage::LoadTemplate() or 
CXTPPropertyPage::LoadTemplate(HGLOBALhTemplateHINSTANCEhInst) virtual. That would
allow me to overload it in the derived class and set proper handle to XTPResourceManager().

 



Replies:
Posted By: agontarenko
Date Posted: 08 March 2022 at 5:24am
Hello,

I added virtual specifier for LoadTemplate functions as you asked.

Regards,
Artem Gontarenko



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