Jump to content

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)
_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

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