Print Page | Close Window

Probably bug fix

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Visual C++ MFC
Forum Description: Topics related to Codejock Visual C++ MFC products
URL: http://forum.codejock.com/forum_posts.asp?TID=14502
Printed Date: 29 March 2024 at 11:08am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Probably bug fix
Posted By: xxLuda
Subject: Probably bug fix
Date Posted: 11 June 2009 at 3:58am
In method 'CXTPImageManager::SetIcons' in file 'p:\dependentlibrarieswhole\xtreme toolkitpro v13.0.0\source\common\xtpimagemanager.cpp'

LN3636:
BOOL bIgnoreNulls = (nIconCount == nCount);

update to:

BOOL bIgnoreNulls = (nIconCount == nCount) || ( nCount>0 && pCommands && pCommands[0]==0 );

Without this fix, this doesn't work correctly
UINT btnFilter2[] = {0,1,2,3,4};
m_wndPropertyGrid.GetImageManager()->SetIcons(*pbmpTest,btnFilter2, 5, imgEx.GetIconSize(), xtpImageNormal, TRUE);

LV



Replies:
Posted By: Oleg
Date Posted: 11 June 2009 at 7:18am
Just use
_wndPropertyGrid.GetImageManager()->SetIcons(*pbmpTest,NULL, 5, imgEx.GetIconSize(), xtpImageNormal, TRUE); 
for 0, 1, 2, 3, 4


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


Posted By: xxLuda
Date Posted: 11 June 2009 at 7:30am
I have large PNG file in CImage in our app with about 1000 icons, and need to assign for example icons {3,340} to PropertyGrid. (Assign of whole file is realy slow)

I think, that this function do what i need, but second param of SetIcons is only CmdID and not position in source bmp ;-(.

When I try this, SetIcon load first two Icons and assign CmdID 3 and 340 for these icons.

Is there any way how to do what I need ?

Thanks



Edited:
I'm already resolved icons extracting by self. Currently I'm creating temporary bitmap with requested icons and pass it to SetIcons method.




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