Print Page | Close Window

OnEndLabelEdit

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Task Panel
Forum Description: Topics Related to Codejock Task Panel
URL: http://forum.codejock.com/forum_posts.asp?TID=7227
Printed Date: 21 November 2024 at 12:22pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: OnEndLabelEdit
Posted By: playertwo
Subject: OnEndLabelEdit
Date Posted: 24 May 2007 at 11:44am
I override CXTPTaskPanel::OnEndLabelEdit() to ensure that the user isn't assigning a name that already exists. If the name does exist, I raise a message box (AfxMessageBox) to ask the user if he wants to replace the existing item. This always leads to a crash.

I stepped through the function, and I noticed that as soon as I invoke AfxMessageBox(), OnEndLabelEdit() is called again. Two message boxes come up, and, after closing them both, the program crashes.

How can I raise a message box from OnEndLabelEdit() and avoid this crash?



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