Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - TaskDialog infinite loop on an error case
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

TaskDialog infinite loop on an error case

 Post Reply Post Reply
Author
Message
Julianis View Drop Down
Newbie
Newbie


Joined: 23 March 2017
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Julianis Quote  Post ReplyReply Direct Link To This Post Topic: TaskDialog infinite loop on an error case
    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.

Back to Top
astoyan View Drop Down
Admin Group
Admin Group
Avatar

Joined: 24 August 2013
Status: Online
Points: 333
Post Options Post Options   Thanks (0) Thanks(0)   Quote astoyan Quote  Post ReplyReply Direct Link To This Post Posted: 20 minutes ago at 12:55am
Thanks for reporting this mistake. Indeed, the return value must be -1. I'll be fixed in the upcoming version.

Regards,
   Alexander
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.063 seconds.