Sign in to follow this  
Followers 0
52AT

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

2 posts in this topic

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?

Share this post


Link to post
Share on other sites



Is not there any way to display a png onto GUI as GUI control now?

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  
Followers 0