Window title icon in CXTPTaskDialog |
Post Reply |
Author | |
Marco1
Senior Member Joined: 16 January 2004 Location: Germany Status: Offline Points: 251 |
Post Options
Thanks(0)
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... |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |