Jump to content

Transporent Picture on other picture...


Recommended Posts

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
Link to comment
Share on other sites

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

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

 

Link to comment
Share on other sites

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
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...