|
-
Mar 22nd, 2009, 12:23 AM
#9
Re: Get Height of a window
 Originally Posted by LaVolpe
Fazi, I doubt seriously you will be able to do what you want without manipulating the other window. Using listings for example, many list windows don't try to cache the entire "list" to a DC, because if the list had 1,000s of items in it the bitmap in that DC would be massive in size and probably errors if tried to be created. Most will simply redraw only the items that can be shown on the visible dc.
So, I think the answer would be to literally scroll the window remotely. Scroll it to the top, take snap shot, scroll it a page, take another snap shot, etc. And after you are done, it would be probably a good idea to set the window back to the original scroll position. I think you'd be able to use SendMessage and fire off some WM_VScroll/WM_HScroll messages. Or maybe use the Get/SetScrollPos APIs?
Another option, which probably wouldn't please anyone, would be to SetParent the target window (if possible) to the desktop, maximize it, then send scroll messages as mentioned above. The idea, if it works, would be far less screenshots, but obviously much larger screenshots. Of course, you'd have to put it back (SetParent) and resize it to original size once done. Just thinking off the top of my head.
Thank you
The first solution is what really in my mind. but i am not sure how decided the amount of scroll on each snap. i think for this we need the total scroll height + top & bottom arrow button height is it? if so , how to get that?
2nd solution. yah i think this is the solution rino bull also gave it seems.
first ill try this solution and see how it work
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|