Jump to content

Load custom images to toolbar


Recommended Posts

How do I make a toolbar with my own images??????

I just can't get it..

I have this: (part of code)

$runescape_gui = GUICreate("Runescape Client RsH", 800, 600, 0, 0, $WS_MAXIMIZEBOX+$WS_SYSMENU+$WS_MINIMIZEBOX)
    $hToolbar = _GUICtrlToolbar_Create ($runescape_gui)
    $aSize = _GUICtrlToolbar_GetMaxSize ($hToolbar)
    ;GUIRegisterMsg($WM_NOTIFY, "_WM_NOTIFY")

    ; Add standard system bitmaps
    _GUIImageList_AddBitmap  ( $hToolbar, 'C:\Documents and Settings\Ludo\Bureaublad\Back.bmp' )
    _GUICtrlToolbar_AddBitmap ($hToolbar, 1, -1, $IDB_STD_LARGE_COLOR)

;)    ; Add buttons
    _GUICtrlToolbar_AddButton ($hToolbar, 1, 'C:\Documents and Settings\Ludo\Bureaublad\Back.bmp')
    _GUICtrlToolbar_AddButton ($hToolbar, $idOpen, $STD_FILEOPEN)
    _GUICtrlToolbar_AddButton ($hToolbar, $idSave, $STD_FILESAVE)
    _GUICtrlToolbar_AddButtonSep ($hToolbar)
    _GUICtrlToolbar_AddButton ($hToolbar, $idHelp, $STD_HELP)

but I can't get my own images...... help please??

thnx, ludocus

Edited by ludocus
Link to comment
Share on other sites

You were close, just not close enough :D

#include <GuiToolbar.au3>

$runescape_gui = GUICreate("Runescape Client RsH", 800, 600, 0, 0, $WS_MAXIMIZEBOX+$WS_SYSMENU+$WS_MINIMIZEBOX)

    $hToolbar = _GUICtrlToolbar_Create ($runescape_gui)
    
    $Bitmap = _GUICtrlToolbar_LoadBitmap($hToolbar,"Test.bmp")
    
    _GUICtrlToolbar_AddButton ($hToolbar, $Bitmap, 0)
GUISetState()

While 1
    
WEnd
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...