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: Yesterday 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
 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.098 seconds.