Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - different size Buttons in CXTPToolBar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

different size Buttons in CXTPToolBar

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


Joined: 01 December 2003
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote Wolfgang Quote  Post ReplyReply Direct Link To This Post Topic: different size Buttons in CXTPToolBar
    Posted: 21 July 2005 at 9:34am

Hi,

again a question. I use the CXTPToolBar, so far it worked really nice, but now i would need to add a larger (ie. wider) Button. the normal buttons are 16*16, but one should be 40*16

I thought that

CBitmap bmp;

UINT command=ID_LINKS_SENDING;

bmp.LoadBitmap(IDB_SENDINGBMP);

pCommandBars->GetImageManager()->RemoveIcon(command);

pCommandBars->GetImageManager()->SetIcons(bmp, &command, 1, CSize(41,16)); // set a new (larger) icon for the Sending

would do the trick

It changes the Icon, but the Button still stays 16*16, which means that the Bmp in the Button is shrinked to fit.

Is there a way to enlarge one Button in the Toolbar?

thanks in advance

Wolfgang

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 21 July 2005 at 11:23pm
pToolBar->SetIconSize(CSize(41,16));
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Wolfgang View Drop Down
Newbie
Newbie


Joined: 01 December 2003
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote Wolfgang Quote  Post ReplyReply Direct Link To This Post Posted: 22 July 2005 at 2:54am

this doesn't do the trick.

It makes all buttons that size, i need one Button to be 41*16, the rest schould be 16*16

Does Codejock offer a way to use such a feature? So far I haven't found anyclue for it, in the documentation.

Thanks in advance

Wolfgang

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 22 July 2005 at 1:19pm

Hi, see attached sample.

2005-07-22_131850_CustomButton.zip

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Wolfgang View Drop Down
Newbie
Newbie


Joined: 01 December 2003
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote Wolfgang Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2005 at 9:57am

thanks for your help it works quite fine!!

Nevertheless one more question. Is there a way to place some sapce between some buttons.

E.g. I have to seperate the last Button of the Toolbar from the others. (not via a Seperator but with actual space (20-30 Pixel) of just toolbars.

My first idea was to insert a Button which is always disabled and with no icon.

but maybe there is a more readable way too?

thanks in advance

Wolfgang

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.140 seconds.