Print Page | Close Window

TaskDialog infinite loop on an error case

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=24644
Printed Date: 04 June 2026 at 6:55pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: TaskDialog infinite loop on an error case
Posted By: Julianis
Subject: TaskDialog infinite loop on an error case
Date Posted: 03 June 2026 at 5:54am
We are using an CXTPTaskDialog in our application.

I'm using incorrect settings and the dialog fails to create.
In this case the application ends up in an infinite loop.

The culprit seems to be the handling of the error case in 

int CXTPTaskDialogFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
...
if (!CreateClient(TRUE)) { TRACE0("Failed to create Task Dialog UI window.\n"); return FALSE; }
}

The return FALSE seems to be incorrect (the method returns 0 as success).

If I patch the code with a return -1 when CreateClient() fails, the infinite loop no longer happens.




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