Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Re: How to capture screen under Win32?

by RMGir (Prior)
on Apr 10, 2002 at 18:39 UTC ( [id://158101]=note: print w/replies, xml ) Need Help??


in reply to Re: How to capture screen under Win32?
in thread How to capture screen under Win32?

I could be wrong, and probably am :), but I think GetDC is much likelier to be in GDI32 (the graphics engine) than user32.

I think your $screenshot handle is probably undefined.
--
Mike

  • Comment on Re: Re: How to capture screen under Win32?

Replies are listed 'Best First'.
Re: Re: Re: How to capture screen under Win32?
by lshatzer (Friar) on Apr 10, 2002 at 18:54 UTC
    Using a quickview program, in USER32.dll, it has GetDC()listed. In GDI32.dll it had stuff like GetDCBrushColor and some other various ones like that. Output from $screenshot handle from original code (before the $screenshot->Call() via Data::Dumper:
    $VAR1 = bless( { 'dllname' => 'user32', 'dll' => 2011234304, 'proc' => 2011246207, 'out' => 1, 'in' => [] }, 'Win32::API' );
      Cool...

      I told you I was probably wrong :)

      I just checked the MS docs, and getDC takes a window handle as an argument. Pass 0 to get the DC for the whole screen.

      And don't forget to call ReleaseDC, or bad things can happen...

      We now exit MS win32 api hell, and return you to your regularly scheduled perl programming :)
      --
      Mike

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://158101]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-25 11:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found