XP Icons w diferent behaviour/Interfaces |
Post Reply |
Author | |
andre
Groupie Joined: 09 March 2005 Status: Offline Points: 27 |
Post Options
Thanks(0)
Posted: 30 August 2005 at 1:02pm |
Hi, Why do some controls implement the function SetImageList and some others do not ? How can I show XP icons in CXTPToolbar and CXTShortcutBar using the CImageList that I use in other controls like CXTPTabControl ? Thank You CImageList il; // create image list with XP icons // // This works OK CXTPTabControl.SetImageList( &il ); CXTPTaskPanel::SetImageList( &il ); // This shows a gray rectangle instead of the alpha layer... CXTPToolBar::GetImageManager()->SetIcons( il, 0, 0, 0, xtpImageNormal); CXTPShortcutBar::GetPaintManager()->SetIcons( il, 0, 0, 0, xtpImageNormal );
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello, Are you sure your alpha bitmap is valid? As you can see ShortcutBar sample show Alpha bitmaps without problem. I suggest you don't use CImagList with alpha images because it supoprted only by WinXP, but to add directly alpha bitmap to image manager. CXTPImaegManager::SetIcons(IDB_BITMAP,...) it supports alpha images for all OS. |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
andre
Groupie Joined: 09 March 2005 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
Hi Oleg, I know CXTPShortcutBar show alpha bitmaps, I'm also using XP. The problem is that not all controls show the ImageList the same way. Anyway I do not know how to convert a XP icon file( check "super.ico" in attach ) to xtreme alpha bitmaps, can you please help out ? This screenshot shows the diferences 2005-08-31_080639_icon_problem.zip Thank you |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
What version do you have? If 9.70 use CXTPImageManager::SetIcon(nIDResourceIcon, nIDCommand) method to add alpha icon supported for all OS. Anyway check attached converted Alpha bitmap Add it using SetIcons(nIDResourceBitmap, pCommands, nCount); |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
andre
Groupie Joined: 09 March 2005 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
Hi Oleg, I have the latest 9.70. I admit I did not explain well the "super.ico" example, it is the user that chooses the icon file not me. so I'm not able to insert it in the resource, because I do not know which icon to insert...I have to load it at runtime with LoadImage. But what I don't understand is that some controls kind of like imagelist while some others don't. Why diferent behaviours ? If one control knows how to display XP icons loaded with LoadImage and then inserted in ILC_COLOR32 image list, why some others do not ? In the screenshot I send, you can see that TabControl, DockManager, and TaskPanel display the icon correctly while ToolBar and Shortcut bar don't. Since I do not have this problem with Alpha bitmaps, what I really need is something like this... HICON h; AlphaBitmap bitmap; bitmap = ConvertIcon2AlphaBitmap( h ); Is there a function like this in the toolkit ?
André
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
You must say before, that you load it from file :) Here some source you can use: HBITMAP hBitmap = CXTPImageManagerIcon::LoadAlphaIcon(Path, 0); if (hBitmap) DeleteObject(hBitmap); } else if (!hIcon) SetIcon(hIcon, Command, 0, (XTPImageState)imageState); DestroyIcon(hIcon); |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
andre
Groupie Joined: 09 March 2005 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
Hi Oleg,
Regards |
|
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 |