Sign in to follow this  
Followers 0
XTensionX

Getting image from handle

2 posts in this topic

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)
_Main()
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)
    GUISetState()
    _GDIPlus_Startup ()
_GDIPlus_GraphicsDrawImage ($hGUI, $handle, 200, 250)
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    _GDIPlus_Shutdown ()
EndFunc

Thanks

Share this post


Link to post
Share on other sites



bump

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