Results 1 to 27 of 27

Thread: [RESOLVED] GetActiveWindow question for screen capture app

Threaded View

  1. #21

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: GetActiveWindow question

    What are these constants?
    theHwnd = &HAC03DC ' &H460450

    GetClientRect theHwnd, rctW returns a rectangle with all zeros.

    However, if I place this statement at the very beginning,

    hWnd = GetForegroundWindow()

    then it works, except the resulting size is the maximum of all previously captured windows, see attached image. Also, as you point out, sometimes the captured window is black.

    The code for capturing the entire window works satisfactorily so, maybe it would be easier if the dimensions of the client area could be somehow calculated / retrieved. Then a BitBlt would easily do the trick.
    Attached Images Attached Images  
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width