Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get HDC of Image
Message
From
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:
00260631
Views:
14
>Hi Vinod,
>
>As a friend of mine once said, you're comparing apples (VB) and basketballs (VFP) here.
>
>In VB the picture control is actually a window displaying the picture. Because it's a window it has it's own window handle (usually referred to as an hWnd) and device context (referred to as hDC).
>
>In VFP, the image control is not a window and as such does not have a window hand nor device context. Therefore, by getting the window handle of the form, using that to get its device context, you can use that (the window's hDC) to call CreateCompatibleDC().
>
>Does this help?

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...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform