Print Page | Close Window

CXTPTaskDialog and icons

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=17490
Printed Date: 20 August 2025 at 5:48am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPTaskDialog and icons
Posted By: nikb
Subject: CXTPTaskDialog and icons
Date Posted: 26 October 2010 at 12:24pm
Hello,

I'll start off by saying I'm using an older version of the library; this may have already been addressed in the current code. If so, great and please disregard.

I was trying to create a modal task dialog that had a 48x48 icon. I was very surprised to see that the size of the icon is always hard-coded to be 32x32, even when forcing the use of the CodeJock task dialog implementation and not the native Windows version.

What's worse, is that the CXTPTaskDialog class, despite having a member variable that defines the size of the icons makes it almost impossible for a derived class to change it in a reliable way.

There's a few ways of implementing this, all of which are trivial. You could, for example, make CXTPTaskDialogClient::RefreshMetrics a virtual function. Or you could have an explicit SetMainIconSize function. Or you could make the existing SetMainIcon accept a CSize parameter or call GetIconInfo to retrieve the actual size of the loaded resource.

It's a small thing, but it's the small things that count sometimes.

Thanks,

Nik B.



Replies:
Posted By: znakeeye
Date Posted: 26 October 2010 at 3:43pm
+1

-------------
PokerMemento - http://www.pokermemento.com/


Posted By: Oleg
Date Posted: 27 October 2010 at 4:08am
Hi,

We alerady wrote that main porpose of CXTPTaskDialog class is to provide interface to system Windows7/Vista builtin TaskDialog and create same Dialog for older OS.  

System TaskDialog don't have way to change Size of Icon so we can't add such method too for System version.   

experienced users can indeed override RefreshMetrics (in last release its already virtual)  and disable system task usage for all OS.


-------------
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