Print Page | Close Window

CXTPTaskDialog relative positioning bug

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=17052
Printed Date: 24 June 2025 at 6:34pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPTaskDialog relative positioning bug
Posted By: flashk
Subject: CXTPTaskDialog relative positioning bug
Date 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.



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