Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Controls
  New Posts New Posts RSS Feed - CXTPTaskDialog relative positioning bug
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPTaskDialog relative positioning bug

 Post Reply Post Reply
Author
Message
flashk View Drop Down
Groupie
Groupie


Joined: 04 March 2008
Status: Offline
Points: 44
Post Options Post Options   Thanks (0) Thanks(0)   Quote flashk Quote  Post ReplyReply Direct Link To This Post Topic: CXTPTaskDialog relative positioning bug
    Posted: 02 August 2010 at 6:58pm
I noticed that CXTPTaskDialog does not properly position itself relative to the parent window if you don't actually specify a parent window in the constructor. I looked through the code, and the main application window is being used as the parent, but it's not being used to perform relative positioning of the dialog.

The fix for this is very simple. Just add the following line of code at the beginning of the CXTPTaskDialogClient::CreateClient method:

m_pConfig->hwndParent = GetParent()->GetSafeHwnd();

This syncs the internal hwndParent parent field of the CXTPTaskDialogClient class with the real parent of the dialog.

With this fix the CXTPTaskDialog will now behave more similarly to the standard CDialog class.

Hopefully this fix can be included in the next release.
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.141 seconds.