Jump to content

How to load a png onto the GUI as a GUI Controls?


Recommended Posts

I have searched throught the forums for "png" and found that the code below to load a png onto the screen.

#include <GUIConstants.au3>
HotKeySet("ESC", "Exits")
$pic="G:\Simulator\GBA\Pics\0.png"
$dll = DLLOpen("cwebpage.dll")

If $dll = -1 then
    MsgBox(48,"ERROR...","CWebpage library failed...")
    Exit
EndIf

$Main = GUICreate("Graphics...",240,160,200,200,$WS_POPUP)
DLLCall($dll,"long","EmbedBrowserObject","hwnd",$Main)
GUISetState()
$a = '<BODY scroll=no><img src="Picturefilename with path" width=240 height=160>'
DLLCall($dll,"long","DisplayHTMLStr","hwnd",$Main,"str",$a)

While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = -3
        ExitLoop
    EndSelect
WEnd

Func Exits()
    DLLCall($dll,"long","UnEmbedBrowserObject","hwnd",$Main)
    DLLClose($dll)
EndFunc

But, how to load a png onto the GUI as a GUI Controls?

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