Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get HDC of Image
Message
 
To
02/09/1999 11:06:38
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordan
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00260509
Message ID:
00260687
Views:
14
>Yes, it helped a little bit.. I guess will have to explain the whole thing which I'm planning to do..
>
>I'm converting a vb app in vfp (which uses win 32 api calls...)
>
>Basically the vb app does following :-
>
>1. Loads a user defined image in image control
>2. Gets its dc, create compatible bitmap,
>3. transfers it to another location
>
>(In the whole process, it uses all these functions like bitblt, selectobject etc..
>
>As this being my first win32api app, i just wanted to see whether the same thing can be done in vfp or not...
>
>From ur old threads only i came to know to use foxtools api funcitons to get window thread.. otherwise vb was simply using me.hwnd..
>
>Pls advs. ur comments...

Hi Vinod,

It sounds like it does the same thing that Obj2Bmp does, but without the user interface.

The BMPMaker class handles all the details of actually creating the bitmap. If you pass the MakeBitmap() method the window handle of the form, bits per pixel, top and left coordinates, and the height and width (all of these last four in pixels) of the object on the form, it creates a bitmap of that portion of the form.

Getting the coordinates of the object can be tricky, since they're always relative to the container they're in. The Object Picker form class has methods to retrieve these values.

I think if you look at the code in the MakeBitmap method of BMPMaker, you'll see references to the exact same Win32 calls that you mentioned above.
George

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

Click here to load this message in the networking platform