Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - First-chance exception in <program.exe> (Comctl32.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

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

 Post Reply Post Reply
Author
Message
Michl View Drop Down
Senior Member
Senior Member


Joined: 14 September 2007
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote Michl Quote  Post ReplyReply Direct Link To This Post Topic: First-chance exception in <program.exe> (Comctl32.
    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:
 
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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Michl View Drop Down
Senior Member
Senior Member


Joined: 14 September 2007
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote Michl Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

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

This page was generated in 0.031 seconds.