Print Page | Close Window

Window title icon in CXTPTaskDialog

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=17704
Printed Date: 14 May 2024 at 9:56am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Window title icon in CXTPTaskDialog
Posted By: Marco1
Subject: Window title icon in CXTPTaskDialog
Date Posted: 19 December 2010 at 4:35pm
Hi Folks,
I'm facing a really strange problem. I construct a TaskDlg the following way:

CXTPTaskDialog taskDlg;
taskDlg.SetUseComCtl32(TRUE);
//  taskDlg.SetCommonButtons(TDCBF_CANCEL_BUTTON);
//  taskDlg.EnableCancellation();
taskDlg.SetWindowTitle(_T("Update"));
taskDlg.SetMainInstruction(_T("lalala"));
taskDlg.SetContent(_T("Page 1"));
taskDlg.SetMainIcon(MAKEINTRESOURCE(IDI_DOWNLOAD));
taskDlg.AddButton(_T("Start"), ID_BUTTON_NEXT);
taskDlg.DoModal();

Really nothing fancy.
Now, if I add a button with the ID IDCANCEL or if I uncomment one of the both lines above and I get a Cancel Button (okay), a red Dlg close box and an icon in the window title. Why that, why the icon?
I investigated the sample, but I never see an icon in the window title.

Whats wrong with my task dlg? How can I avoid the window title icon? I only want the main icon - not two same icons.

If I set SetUseComCtl32 to false, the window title icon disapears.
Any hints appreciated! (running on Win7 with MfC 13.4.2)


And the SetMainIcon() seems not to work in OnDialogConstructed. The main icon remains unset.
In CJ Timer sample app, setting the icon via the same method is no problem, but something must be different here...



-------------
Product: XTP 18.3.0 on VS 2017
Platform: VS 2017 / Windows 10 (64bit)



Replies:
Posted By: Oleg
Date Posted: 20 December 2010 at 4:37am
Hello,

Indeed strange - if you set some parent for dilaog:
CXTPTaskDialog taskDlg(this); // some parent class
then it doesn't show icon.

 when you set SetUseComCtl32(TRUE) we only call system TaskDialogIndirect function so I not really sure why setting parent make this difference.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



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