Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC
  New Posts New Posts RSS Feed - Probably bug fix
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum LockedProbably bug fix

 Post Reply Post Reply
Author
Message
xxLuda View Drop Down
Newbie
Newbie


Joined: 03 June 2009
Location: Czech Republic
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote xxLuda Quote  Post ReplyReply Direct Link To This Post Topic: Probably bug fix
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group
Avatar

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: 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
Back to Top
xxLuda View Drop Down
Newbie
Newbie


Joined: 03 June 2009
Location: Czech Republic
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote xxLuda Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.063 seconds.