Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Controls
  New Posts New Posts RSS Feed - Window title icon in CXTPTaskDialog
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Window title icon in CXTPTaskDialog

 Post Reply Post Reply
Author
Message
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Topic: Window title icon in CXTPTaskDialog
    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...

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
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.140 seconds.