radienergos Posted February 20, 2008 Posted February 20, 2008 (edited) This example shows a png image inside a gui, but when i minimize the gui (or open another window infront of the gui) the image disappears. Is there any way to redraw (except adding the graphicdrawimage into the loop) or lock somehow the image ? PS. The code is from installation of autoit3 (Autoit3\Examples\Gui\Advanced\ShowPNG.au3) PS 2. I want to redraw the png image not the window #include <GDIPlus.au3> #include <GuiConstantsEx.au3> Opt("MustDeclareVars", 1) Global $hGUI, $hImage, $hGraphic $hGUI = GUICreate("Show PNG", 240, 240) GUISetState() _GDIPlus_StartUp() $hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Images\Torus.png") $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, 0, 0) do until GUIGetMsg() = $GUI_EVENT_CLOSE ; Clean up resources _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_ImageDispose($hImage) _GDIPlus_ShutDown() Edited February 20, 2008 by radienergos
rasim Posted February 20, 2008 Posted February 20, 2008 radienergosThis example showsWhere example?Is there any way to redrawGuiCtrlSetState($hPic, $GUI_DISABLE)_WinAPI_RedrawWindow
radienergos Posted February 21, 2008 Author Posted February 21, 2008 I didn't post the code because was from installation of autoit3 (Autoit3\Examples\Gui\Advanced\ShowPNG.au3) I want to redraw the png image not the window Thanks
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now