?
Solved

CPropertySheet

Posted on 2010-11-11
3
Medium Priority
?
1,199 Views
Last Modified: 2012-05-10
Hi I have a problem when creating a CPropertySheet and CPropertyPage.When I run my program both debug or release mode I get an error First-chance exception at 0x773d7901 in PYDVR.exe: 0xC0000005: Access violation writing location 0x004739ec the error is generated after i call DoModal() and is generated in the file dlgprob.cpp line 931 HWND hWnd = (HWND)::AfxPropertySheet(&m_psh); The strange thing is it dosnt cause the application to fail and the property pages work fine even if i run the release version there is no crash. I tried the three ms samples CmnCtrl1 and Cmnctrl2 both do not cause the same error but running Cmnctrl3 example the same error happens I am using vs2010. Has anyone come accross this error? I don't think its my code as I have basically copyied the ms sample.
0
Comment
Question by:nchannon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 31

Accepted Solution

by:
Zoppo earned 500 total points
ID: 34115354
Hi nchannon,

first-chance exception may occur in some cases without being caused by a bug - here's a short article about what first-chance exceptions are: http://support.microsoft.com/kb/105675/en-us

In short words a first-chance exception is shown by the debugger as soon as the exception occurs but before the program probably handled it. The second-chance exception is thrown if such a first-chance exception isn't handled by the application.

Of course it would be good to know the reason because it could be an indication for an error in your code - check the debug output if there's someting strange. Maybe going through the code with the debugger may even give you a hint what's the cause.

Hope that helps,

ZOPPO
0
 
LVL 5

Assisted Solution

by:greatsubash
greatsubash earned 500 total points
ID: 34118206
0
 

Author Comment

by:nchannon
ID: 34121004
Thanks Zoppo at least I can ignore the first-chance exception as it only happens the once still I think it must be a bug between XP and WIN7 as it is fine when you debug under WIN7 only throws the exception under XP.
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question