• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 292
  • Last Modified:

delete button from a toolbar in resource editor

visual studio 2005

Can someone please tell me how to delete a toolbar button in the resource editor? I have 5 toolbar buttons that I'm actually using, but I accidentally added a few extra that aren't being used. When I right click the button. and choose 'delete', nothing happens. What's excellent is if I try 'delete' on the last button space, it actually adds an additional button space.

Please help, my misery is unprecedented.
0
DJ_AM_Juicebox
Asked:
DJ_AM_Juicebox
  • 2
  • 2
1 Solution
 
mahesh1402Commented:
You may left click  on button of toolbar (select)  and drag that button outside toolbar area...just select button and drag that outside by holding left click.

-MAHESH
0
 
bdunz19Commented:
What I do to solve this is go to the solution editor, then find my project .rc file. Right click the file and select "View code". Then scroll through the file untill you see the resource id of your tool bar and a type: TOOLBAR. It will look like this:

IDR_MAINFRAME TOOLBAR  16, 15
BEGIN
    BUTTON      ID_FILE_NEW
    SEPARATOR
    BUTTON      ID_EDIT_CUT
    BUTTON      ID_EDIT_COPY
    BUTTON      ID_EDIT_PASTE
    SEPARATOR
    BUTTON      ID_APP_ABOUT
    BUTTON      ID_123412
END

Where BUTTON ID_123412 is the unwanted button at the end. Just delete     BUTTON      ID_123412 from this code and save your resource file. Then when you open the toolbar from the resource editor, you will see no more unwanted button!

Good luck,
Brandon
0
 
mahesh1402Commented:
To delete a toolbar button : you just need to :
Select the toolbar button and drag it off the toolbar.

Look here : http://msdn2.microsoft.com/en-us/library/24x74c03.aspx <========

-MAHESH

0
 
bdunz19Commented:
Mahesh,
Your way is much easier than mine. I learned something new, thanks!
0
 
DJ_AM_JuiceboxAuthor Commented:
so bizarre! Thanks.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now