Jump to content
Sign in to follow this  

Getting image from handle

Recommended Posts


Hi, I am trying to capture an image by its handle.. im just wondering if its possible (if the window is hidden)

I tried playing around with the helpfiles but i cant seem to get what I wanted.

Im still new to GDIPlus but here is what i came up with (doesnt work) but I think it could give you an idea of what I am trying to do.

#include <GuiConstantsEx.au3>
#include <GDIPlus.au3>
Opt('MustDeclareVars', 1)
Func _Main()
    Local $handle, $hGUI
$handle = ControlGetHandle("Window", "", "[CLASS:Frame; INSTANCE:1]") ;Handle to a control with image(Hidden window)
    $hGUI = GUICreate("GDI+", 400, 300)
    _GDIPlus_Startup ()
_GDIPlus_GraphicsDrawImage ($hGUI, $handle, 200, 250)
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    _GDIPlus_Shutdown ()


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.