Jump to content
Sign in to follow this  
Enforcer

Transporent Picture on other picture...

Recommended Posts

Enforcer

I made a simple GUI, and put on it picture (disabled (only for BG)), then added other picture on it - and that picture must have transporent backgound.

AND I DON't KNOW HOW TO DO IT... so many examples, but that didn't get it.

This thig i realy need to make contact list for my messager =)

Eny help, eny links ?


[RU] Zone

Share this post


Link to post
Share on other sites
wolf9228

I made a simple GUI, and put on it picture (disabled (only for BG)), then added other picture on it - and that picture must have transporent backgound.

AND I DON't KNOW HOW TO DO IT... so many examples, but that didn't get it.

This thig i realy need to make contact list for my messager =)

Eny help, eny links ?

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GDIPlus.au3>
Opt("OnExitFunc", "endscript")

$hWnd = GUICreate("Form", 500, 500, 303, 100)
_GDIPlus_Startup ()
Global $W = _WinAPI_GetClientWidth($hWnd), $H = _WinAPI_GetClientHeight($hWnd)
Global $hImage  = _GDIPlus_ImageLoadFromFile ("messenger_big.gif")
Global $hBitmap = _WinAPI_CreateSolidBitmap($hWnd, 15526360, $W, $H) ; 15526360 ==> BkColor
$hBitmap = _GDIPlus_BitmapCreateFromHBITMAP ($hBitmap)

GUIRegisterMsg($WM_ERASEBKGND, "WM_ERASEBKGND")
GUISetState(@SW_SHOW)

   

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

Func WM_ERASEBKGND($hWnd, $Msg, $wParam, $lParam)
$hGraphic = _GDIPlus_GraphicsCreateFromHDC ($wParam)
_GDIPLus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0,$W, $H)
_GDIPLus_GraphicsDrawImageRect($hGraphic, $hImage, 0, 0,$W, $H)
 Return True
EndFunc






Func endscript()
 _WinAPI_DeleteObject ($hBitmap)
  _WinAPI_DeleteObject ($hImage)
_GDIPlus_ShutDown ()
EndFunc

صرح السماء كان هنا

 

Share this post


Link to post
Share on other sites
Yashied

I made a simple GUI, and put on it picture (disabled (only for BG)), then added other picture on it - and that picture must have transporent backgound.

AND I DON't KNOW HOW TO DO IT... so many examples, but that didn't get it.

This thig i realy need to make contact list for my messager =)

Eny help, eny links ?

Look at this.

Posted Image

Posted Image Zoom

Edited by Yashied

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.