Writing a VBX: Transparent window possible? 
Author Message
 Writing a VBX: Transparent window possible?

I am writing a custom button control (using the CDK) to handle multiple button
faces and irregular hotspots.  One the properties required is transparency of
the bitmap based on an RGB long.  I have the masking routines to do the
transparent blits, but I am unable to get the hDC of the surface just under my
control.  So the question is this:

Is it possible to get an hDC to the area underneath a window?

I've looked at CreateWindowEx, which provides a WS_EX_TRANSPARENT style
(forcing the area underneath to repaint before sending WM_PAINT), but this
style does not seem to be supported by VBRegisterModel (in the MODEL struct).  
This may not be very pretty solution anyways because it might cause some
flashing.  The other alternative would be to make this a graphical control,
which I reluctant to do because the hotspot management depends on the having
an hWND.  Any help/suggestions would be much appreciated.  

Norman Kang

In addition, any other good references for VBX coding?  I currently use the
CDK reference (the one that came with VB 3.0) and Cilwa/Duntemann book
(Programming Power with Custom Controls).

Mon, 17 Nov 1997 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Possible to write Windows NT Service in VB4?

2. Transparent Windows in Windows 2000

3. Transparent windows in windows 95/98 how to ?

4. Transparent windows in windows 95/98 how to ?

5. VB3 VBX for transparent GIFs?

6. Transparent AVI (VBX/DLL).

7. Transparent background in VBX control?

8. Transparent Frames-- possible???

9. Is it possible to make a transparent checkbox

10. Transparent backgrounds in picture boxes: is it possible?

11. Is it possible to make a treeview transparent?

12. Is it possible to make a Form transparent?


Powered by phpBB® Forum Software