Print Page | Close Window

First-chance exception in <program.exe> (Comctl32.

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=8004
Printed Date: 18 June 2025 at 4:03am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: First-chance exception in <program.exe> (Comctl32.
Posted By: Michl
Subject: First-chance exception in <program.exe> (Comctl32.
Date Posted: 14 September 2007 at 7:09am

Hi XTP programers

If I select customize (ribbon bar) than everytime I get a first chance exception.
 
During analysation the problem, I found this article:
http://support.microsoft.com/kb/158552/en-us - http://support.microsoft.com/kb/158552/en-us
 
A look into MSDN for PROPSHEETPAGE Structure confirme the problem.
pResource
Pointer to a dialog box template in memory. The PropertySheet function assumes that the template is not write-protected. A read-only template will cause an exception in some versions of Windows.
 
The exception doesn't raised if the current font (CDialogTemplate) and the actual font of the property sheet dialog is not equal. So the function
_AfxChangePropPageFont(pTemplate, bWizard);
in method CPropertyPage::PreProcessPageTemplate(PROPSHEETPAGE& psp, BOOL bWizard) makes a writeable copy of the dialog resource.
 
This class also free the global memory object at termination.
 
To resolve the problem I would like to subclass CXTPRibbonCustomizeQuickAccessPage and overwrite the method PreProcessPageTemplate
to create always a copy. But the problem is, that
a) this work have to do for every page
b) 2 pages/objects already created in CXTPCustomizeSheet
 
Make it sense to modify your classes and create a copy at default?
 
Best regards
Michael Sabo



Replies:
Posted By: Oleg
Date Posted: 15 September 2007 at 1:12am
Hello,
Its not serios problem and it appears for each PropetySheet dialog, You can ignore it.


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


Posted By: Michl
Date Posted: 17 September 2007 at 6:31am
That's right.
But it would be nice if no exception is raised and it is possible to suppress the exception. So the exception don't confuse for someone who don't know about this problem (as I before).
 
Michael



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