Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Foxtools.Fll
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00173768
Message ID:
00173860
Views:
42
>>>I am capturing a screen from FoxPro. During the process I call the GetDIBits API call that takes the screen width * the screen Hieght * 3 which most of the time it gives me a string over 900,000 Charaters to pass to FoxTools.
>>>
>>Hi Chuck,
>>
>>Why are you multplying it by 3? Been my experience that 1 scan line = 1 pixel (or at least it does in Win32).
>
>It is a 1 to 1 if you are doing a 256 color bitmap but if you want a 24 bit bitmap it is a 1 to 3. I wouldn't mind a 256 or a 16 color bitmap, but the only example I had to go off of was 24 bit. I tried the 256 and 16 but it didn't work. It turned out off center and in monocrome. If you have any ideals on how to get it to work in 256 or 16 colors I would be glad to listen.

Hi Chuck (or do you prefer Charles),

I haven't seen any indication of the 1 to 3 ratio in the SDK (16 or 32 bit), but it does make sense. I have, however, had success in "grabbing" an object reference in VFP to a 16 color bitmap, regardless of the windows settings. The only problems I've run into is when the window handle is for a screen that covers the deskop completly. It sounds, from what you've mentioned, that you need a call to SelectObject() in there somewhere.

There are a couple of questions. What are you trying to do? (I assume that you're trying to turn a window handle into a bitmap). The other question is how?

If you've read the recent posts between David Frankenbach and myself you may know that I'm currently trying to create bitmaps from window handles. If you'll drop me an email, I'll be happy to share (albeit 32 bit) what I have.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform