-
October 18th, 2011, 09:08 AM
#1
Load image on tooBars toolbuttons.
Dear Friends
I am having trouble in placing images on the toolBar toolbuttons. The option is there to load a palette but there's no option for loading an image file onto the toolButtons. Please tell me if there's a ready made way to load an image icon on the toolbuttons. Thanks a lot in advance.
-
October 19th, 2011, 04:47 AM
#2
Re: Load image on tooBars toolbuttons.
Your question is far away to be clear.
Are you using MFC, raw-WinAPI or something else?
Where/in which function did you find "an option to load a palette but no option for loading an image file"?
Please, clarify!
-
October 19th, 2011, 09:13 AM
#3
Re: Load image on tooBars toolbuttons.
I am using MFC. VC++...........I am loading a toolBar like this
if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!m_wndToolBar.LoadToolBar(IDR_TOOLBAR1))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}
m_wndToolBar.LoadToolBar(IDR_TOOLBAR1);
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);
Then using rosource option I am able to create variouis toolbuttons on the toolbar applying event-handling. But how can I put different pictures/images on the toolbuttons. I dont find interesting to use palette. Can we use ready made image files. like png, jpeg etc. Thanks sujan
-
October 19th, 2011, 10:13 AM
#4
Re: Load image on tooBars toolbuttons.
Originally Posted by sujan.dasmahapatra
I dont find interesting to use palette. Can we use ready made image files. like png, jpeg etc. Thanks sujan
You could just open these image files in some editor and then copy/paste pictures to your toolbar button...
Victor Nijegorodov
-
October 19th, 2011, 12:38 PM
#5
Re: Load image on tooBars toolbuttons.
Its not possible just copy and paste. do u know MFC VC++ 2005.....This is not enabled.
-
October 20th, 2011, 02:16 AM
#6
Re: Load image on tooBars toolbuttons.
Open your toolbar resource in the resource editor of Visual Studio.
Then you can edit each image for each button and then you can copy/paste images from other programs into a button.
Or you can use a toolbar image editor, for example I'm using Axialis IconWorkshop and it's very easy to use.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|