[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

ShowDialog() causes SEHException: Why???

Posted on 2005-04-07
3
Medium Priority
?
602 Views
Last Modified: 2008-01-09
Hi all,

Here's the sequence of events for this problem I'm having:
1) I have no SEHExceptions
2) I add a class to my project containing __event declarations
3) I add code in another class to subscribe to the events in the new class
4) An old dialog box, one that has been closing without any hiccups for many months, suddenly throws an SEHException whenever it closes.
5) If I undo all __event declarations and comment out the subscribing and handling code the problem goes away.

I've been googling this problem for a few hours and find that most occurrences of this problem resulted from adding the EnableVisualStyles call in code. However, in my case, I am not doing that. I had never heard of EnableVisualStyles before I began googling for this problem.

Does anyone know how to identify the source of this particular SEHException? I can't even catch the exception with try{} catch(System::Runtime::InteropServices::SEHException * e) {}. I'm stumped and my boss is not happy because this problem is holding up my scheduled release.

Any help is much appreciated.

javanic
0
Comment
Question by:javanic
2 Comments
 
LVL 1

Author Comment

by:javanic
ID: 13766727
Well, this problem has gone away for me. I changed several settings in my C/C++ compile property pages (in MS 2003 .NET IDE) and the problem went away. I wish I could say exactly which of the changes solved the problem, but I can't. I tried to undo each of the changes one by one to find the culprit, but I could not duplicate the problem with those changes.

I had noticed that several of my settings were not the default ones for a .exe product. I simply selected the <inherit from project type> option and recompiled.

If there's a lesson here it is: don't mess with the compile options unless you know exactly what you are doing. Just take the project type defaults when possible.

To the area admins, I suggest this be PAQ'd and closed with points refunded.
0
 
LVL 1

Accepted Solution

by:
GhostMod earned 0 total points
ID: 14006451
PAQed with points refunded (250)

GhostMod
Community Support Moderator
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Integration Management Part 2
Suggested Courses
Course of the Month20 days, 13 hours left to enroll

864 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