Jump to content

Recommended Posts

Posted (edited)

sample:

#include <GuiFlatButton.au3>
    
    ; other codes here

    local btn7=GuiFlatButton_Create("Sample button Title",100,40,140,180,$BS_MULTILINE+$BS_TOOLBUTTON)
    GUICtrlSetFont ( $btn7, 14 , 700, 0, "Arial", 5 )

                Local $clr_bkg=0x1C4D7D
                Local $clr_txt=0xFFFFFF
                Local $clr_bdr=0x1C91E4
                Local $clr_bkg_f=0x1C4D7D
                Local $clr_txt_f=0xFFFFFF
                Local $clr_bdr_f=0x1C91E4
                Local $clr_bkg_h=0x1C91E4
                Local $clr_txt_h=0xFFFFFF
                Local $clr_bdr_h=0xFFFFFF
                Local $clr_bkg_p=0x00C4F1
                Local $clr_txt_p=0xA6A6A6
                Local $clr_bdr_p=0xA6A6A6

                Local $aBt1Clrs[12] = [$clr_bkg, $clr_txt, $clr_bdr, $clr_bkg_f, $clr_txt_f, $clr_bdr_f, $clr_bkg_h, $clr_txt_h, $clr_bdr_h, $clr_bkg_p, $clr_txt_p, $clr_bdr_p]
                GuiFlatButton_SetColorsEx($btn7, $aBt1Clrs)
                
                ;get images for demonstration
                _GDIPlus_Startup() ;initialize GDI+
                    Local $PNG_TEST="BtnIMG.png"
                    Local $hBitmap = _GDIPlus_BitmapCreateFromFile($PNG_TEST)
                    Local $hHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)                  ;Create HBitmap from Bitmap
                    _GDIPlus_BitmapDispose($hBitmap)                                                    ;dispose the bitmap
                _GDIPlus_Shutdown() ;done with GDI+
                _WinAPI_DeleteObject(_SendMessage(GUICtrlGetHandle($btn7), $BM_SETIMAGE, 0, $hHBitmap))
    
    ; other codes here

btn text not Wrap

$BS_MULTILINE+$BS_TOOLBUTTON with setimage not worked

or

Button Color not Worked

?!

 

Edited by Parsix

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
  • Recently Browsing   0 members

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