![]() |
CXTPToolBar cant use BITMAPS? |
Post Reply ![]() |
Author | |
JoWi ![]() Newbie ![]() Joined: 07 November 2003 Location: Netherlands Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() Posted: 08 March 2004 at 4:45am |
Hello, I need to dynamically create a CXTPToolbar (8.61 suite) at runtime. I add controls using where m_pSnapinToolbar is a CXTPToolbar and nID is the ID of the (corresponding menu) item(s). I also need to create images for the toolbar, the images will be provided by an external DLL as HBITMAP handles. The problem is that i cannot find a way to add my CBitmap images (which are 15x15 pixels) to the toolbar. I tried using the different formats of CImageManager->SetIcons(...) but i can't get any of them to work with bitmaps. When i use HICON's which are 32x32 it all seems to be ok, but i *must* use bitmaps. (Also icons of 16x16 size will not work) So what i need is a way to add a CXTPControl to a toolbar, set it's ID, tooltip, description AND IMAGE using a bitmap. Thanks, jowi |
|
![]() |
|
Sven ![]() Senior Member ![]() Joined: 21 August 2003 Location: Germany Status: Offline Points: 127 |
![]() ![]() ![]() ![]() ![]() |
Use BOOL CXTPImageManager::SetIcons(CBitmap& bmpIcons, UINT* pCommands, int nCount, CSize szIcon, XTPImageState imageState = xtpImageNormal, BOOL bAlpha = FALSE); |
|
![]() |
|
JoWi ![]() Newbie ![]() Joined: 07 November 2003 Location: Netherlands Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
Thanks Sven, but i can't get that to work either. COuld you give me an example ? The function you describe probably expects a CBitmap which contains images for ALL buttons, concatenated one after another, like a toolbar resource i guess. I need to set ONE bitmap for ONE particular button. Let's say i want a toolbar with ONE button, and i only have a BITMAP for that button ( NO icon, NO Imagelist, NO resource usage or entries whatsoever) , how do i create the toolbar ? Thanks |
|
![]() |
|
Sven ![]() Senior Member ![]() Joined: 21 August 2003 Location: Germany Status: Offline Points: 127 |
![]() ![]() ![]() ![]() ![]() |
You can call SetIcons(...) more than once, for each button you like to add.
|
|
![]() |
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 |