Jump to content
Sign in to follow this  
ludocus

Load custom images to toolbar

Recommended Posts

ludocus

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

Share this post


Link to post
Share on other sites
ludocus

anybody?

Share this post


Link to post
Share on other sites
Kip

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

Share this post


Link to post
Share on other sites
ludocus

thnx it works,

But I don't get the holl picture. How can I make the button bigger?

Share this post


Link to post
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
Sign in to follow this  

×