Click here to Skip to main content
15,892,059 members
Home / Discussions / COM
   

COM

 
GeneralRe: Is it possible to catch a com event in vb or javascript Pin
rwestgraham9-Mar-05 23:20
rwestgraham9-Mar-05 23:20 
GeneralRe: Is it possible to catch a com event in vb or javascript Pin
grinder13-Mar-05 19:33
grinder13-Mar-05 19:33 
GeneralDCOM event sink on Terminal Services Pin
FearlessBurner7-Mar-05 2:06
FearlessBurner7-Mar-05 2:06 
GeneralWMI -> Win32_OperatingSystem Pin
Stefak6-Mar-05 13:21
Stefak6-Mar-05 13:21 
GeneralTransparent ActiveX Control Pin
gameengineer5-Mar-05 4:22
gameengineer5-Mar-05 4:22 
GeneralRe: Transparent ActiveX Control Pin
Pinhead_Me10-Mar-05 7:58
Pinhead_Me10-Mar-05 7:58 
GeneralRe: Transparent ActiveX Control Pin
smjones10-Mar-05 13:49
smjones10-Mar-05 13:49 
GeneralRe: Transparent ActiveX Control Pin
smjones14-Apr-05 11:57
smjones14-Apr-05 11:57 
Its been a while since I have been able to get back to this code but here I am.

Ok, to keep things simple I created a basic Windowless control that subclasses nothing. To cause the control to update I added a left mouse click handler in the control. I understand that IOleInPlaceObjectWindowless interface will redirect this mouse click from the container back to the control because since the control now has no window of its own it cannot handle the mouse message by itself. Because of the interface now it can. I added it so that I can manually cause the control to be updated therefore causing its OnDraw() method to be called.

So far so good. Then I put your code which calls the method MyControl::GetClientSiteMember() in the left mouse click handler. That works too.

How did you make sure the container had a valid window before calling any functions that report back stuff related to it's window handle? For example, calling GetClientRect() should get the rect for the control but I believe it uses the containers window handle or something like that. If I put GetClientRect in the control's OnDraw() is get an unhandled exception, basically the m_hWnd == NULL.

The whole thing im trying to do is draw a border around the control, draw a few shapes inside the control area rect and allow the container's background underneath the control to show through.

MSDN's Providing Windowless Activation talks about common examples of using windowless controls as having transparent controls. Text is painted but not the control background. They give no further direction as far as I could find.

Your help is appreciated but I think I need a little more direction.
BTW, in case you were wondering, I have successfully created a few MFC and one ATL ActiveX controls (windowed) and they work fine. But they are not transparent nor transluscent.

-SJ

Manufacturing Software Developer
Hewlett-Packard Company
GeneralRe: Transparent ActiveX Control Pin
Pinhead_Me18-Apr-05 5:44
Pinhead_Me18-Apr-05 5:44 
GeneralCom-Addin Query Pin
Anonymous5-Mar-05 2:14
Anonymous5-Mar-05 2:14 
GeneralWindows Hooking. Pin
technojewel3-Mar-05 20:18
technojewel3-Mar-05 20:18 
GeneralRe: Windows Hooking. Pin
Tarundeep Singh Kalra4-Mar-05 8:15
Tarundeep Singh Kalra4-Mar-05 8:15 
GeneralRe: Windows Hooking. Pin
vishalmore15-Mar-05 19:08
vishalmore15-Mar-05 19:08 
GeneralClient/Server COM+ Application Pin
Wender Oliveira3-Mar-05 14:58
Wender Oliveira3-Mar-05 14:58 
GeneralProblem While Instantiating and calling API through COM Component Pin
Anuj Mishra2-Mar-05 18:04
Anuj Mishra2-Mar-05 18:04 
GeneralIE code download failure for dll and ActiveX control using INF and CAB file Pin
prog012-Mar-05 11:40
prog012-Mar-05 11:40 
GeneralBindIFilterFromStream Pin
cheesepirate2-Mar-05 7:02
cheesepirate2-Mar-05 7:02 
Generaldyanamically create listboxes in ATL Pin
gauravjain1-Mar-05 4:28
gauravjain1-Mar-05 4:28 
GeneralCommunication with one particular instance of an activex/com object Pin
awhit1-Mar-05 0:54
awhit1-Mar-05 0:54 
GeneralCOM and MSFlexGrid Pin
A. Karthick Arun28-Feb-05 20:34
A. Karthick Arun28-Feb-05 20:34 
GeneralCOM,OLE,AUTOMATION,ActiveX Pin
hjkjk28-Feb-05 20:16
hjkjk28-Feb-05 20:16 
GeneralCreating Schema Rowset ( OLE DB) in COM Pin
gauravjain28-Feb-05 5:47
gauravjain28-Feb-05 5:47 
Generalfft scale factor in MRI Dicom images Pin
ramtilak gattu28-Feb-05 5:34
ramtilak gattu28-Feb-05 5:34 
GeneralRe: fft scale factor in MRI Dicom images Pin
dicomapi27-Apr-05 2:20
dicomapi27-Apr-05 2:20 
Generalimplementing COM in c++ Pin
csharp627-Feb-05 18:19
csharp627-Feb-05 18:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.