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
Printed Date: 01 March 2024 at 6:30am
Software Version: Web Wiz Forums 12.04 -

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().


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

I added virtual specifier for LoadTemplate functions as you asked.

Artem Gontarenko

Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 -
Copyright ©2001-2021 Web Wiz Ltd. -