CXTPPropertySheet resource problem |
Post Reply |
Author | |
andreypir
Groupie Joined: 20 August 2015 Status: Offline Points: 10 |
Post Options
Thanks(0)
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(HGLOBAL& hTemplate, HINSTANCE& hInst) virtual. That would allow me to overload it in the derived class and set proper handle to XTPResourceManager(). |
|
agontarenko
Admin Group Joined: 25 March 2016 Status: Offline Points: 299 |
Post Options
Thanks(0)
|
Hello,
I added virtual specifier for LoadTemplate functions as you asked. Regards, Artem Gontarenko |
|
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 |