Jump to content

Recommended Posts

Posted

I am trying to make a customized toolbar. I have tried to combine the standard in $IDB_STD_LARGE_COLOR with my own icons, but it didn't work. If that is possible, how?

Also, if I knew where the icons in $IDB_STD_LARGE_COLOR came from, I could make my own image list. Do the icons come from just shell32.dll?

Posted (edited)

I am trying to make a customized toolbar. I have tried to combine the standard in $IDB_STD_LARGE_COLOR with my own icons, but it didn't work. If that is possible, how?

Also, if I knew where the icons in $IDB_STD_LARGE_COLOR came from, I could make my own image list. Do the icons come from just shell32.dll?

See _GUICtrlToolbar_AddBitmap in the Help File under the UDF section.

$IDB_STD_LARGE_COLOR refers to the large standard system bitmaps on your system. You can add your own resources by doing something similar:

$hGUI = GUICreate("Toolbar", 400, 300)
$custombmp = "test.bmp" ; location to resource
$hToolbar = _GUICtrlToolbar_Create ($hGUI)
$Bitmap = _GUICtrlToolbar_LoadBitmap($hToolbar,$custombmp)
_GUICtrlToolbar_AddButton ($hToolbar, $Bitmap, 0)

As for combining the images on the toolbars, I haven't tested it out but you could try using BitOr($IDB_STD_LARGE_COLOR,$custombmp) and add buttons for both. Again, I have not tried doing this with this particular function.

Edit: Also, GaryFrost and Valuator are very good with Toolbars. I'm certain one of them could expand or elaborate on this further.

Edited by Ealric

My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic]

Posted

BitOr won't work, its pointless in this case.

Take a close look at _GUICtrlToolbar_AddBitmap in the helpfile... The example there should be what you need?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...