Getting hWnd or hDC of custom OCX? 
Author Message
 Getting hWnd or hDC of custom OCX?

Hi All:

Anyone know how to get the hWnd or hDC of a third party OCX? I'm using a
third party chart (First Impression) and need to draw a line and some
shapes on it using API calls. Most such calls need a hWnd or hDC and the
control doesn't provide this as a property. Anyone know a way to get it?
Maybe an API call?

TIA!

--
J. Kevin Meadows



Tue, 10 Aug 1999 03:00:00 GMT  
 Getting hWnd or hDC of custom OCX?

Once upon a time, in the land of comp.lang.basic.visual.misc, J. Kevin
Meadows eloquently composed:

Quote:
>Anyone know how to get the hWnd or hDC of a third party OCX? I'm using a
>third party chart (First Impression) and need to draw a line and some
>shapes on it using API calls. Most such calls need a hWnd or hDC and the
>control doesn't provide this as a property. Anyone know a way to get it?
>Maybe an API call?

Setfocus to the OCX, then use the getfocus API on it for the hWnd.
It looks like GetDC will give you the hDC once you have the hWnd.

TTYL
Ian
--

http://www.sn.no/~balchen/igloo/

Yes, my son, we once thought nobody would ever need 640k...



Fri, 13 Aug 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to get hWnd or hDC of custom OCX?

2. différence entre hWnd et hDC

3. HDC / HWND for an image control??

4. me.hdc and getdc(me.hwnd)

5. Using hWnd to send contents of a window to hDC

6. How to get a hWnd or hDC from a Picturebox

7. Shouldn't GetDC(form1.hWnd) = form1.hdc ???????

8. Getting hDc On Access

9. Getting the screen object's hDC

10. Using PrintDlg and getting hDC of named printer

11. Getting an hDC for a IPictureDisp object.

12. Getting an hDC for a IPictureDisp object.

 

 
Powered by phpBB® Forum Software