Handling notification messages from contained subclassed activex control inside dialog class

Handling notification messages from contained subclassed activex control inside dialog class

Post by Mrinmoy Sah » Tue, 28 Sep 1999 04:00:00

I have a dialog hosting one activex control, which subclasses a windows tree
control. I am interested in handling some regular windows messages and other
notification messages (like the reflected sel_change message), which I
usually can handle inside my activex control class to be handled inside my
Can somebody suggest how I can send the reflected notification messages
normally received and handled by the activex control to be sent and handled
inside my dialog class. (Somehow controlling the reflector window, maybe??)
I donot want to create a new event for each notification message in my
activex control.

1. MFC ActiveX control inside another MFC ActiveX control - MFC Bug

I have to ActiveX Controls created using the AppControl Wizard
provided by Visual C++ 5. I want to create the first control inside
the second control , and here is what happens.

I create the first control in the OnCreate method of the second object
using a wrapper class created using the Component Wizard. When I
create the (first) control I get an assertion in Wincore.cpp in
CWnd::Attach saying that the window is already mapped (was attached
already), everything works fine if I ignore but when the application
closes it raises an exception and dies (sometimes taking the whole
system with it). I traced inside MFC code and found out that when I
call create and finally Windows creates the window, MFC's hook
function that hooks windows creations attaches the windows before
COleControlSite has a chance to do so, and that's why it asserts.
Didn't the guys at Microsoft think about this situation ?

What do I do ?

Another question : Is there any mechanism to show dialog templates
inside a control - something like COleFormControl ???

   Thanks a buch,
      - Dror Kremer


Please reply both by post and e-mail. Thank you !
Dror Kremer                                 | Oh Margie you came
Team OS/2                                   | and you found me a    
                                            | turkey, on my
  E-mail:                                   | vacation away from

  Fidonet:                                  |                    
    97:200/118.3                            |    - Homer Simpson
* Finger for PGP Key, Accepting VoiceChat/2 |
  Calls.                                    |

2. 520 upgrade blues

3. Contained ActiveX Control not getting Keyboard messages

4. Amiga floppies = crap?

5. ActiveX Container Controls (controls inside controls)

6. Shell diff between UNIX and NT on quoting (\")

7. How to subclass a dialog-based ActiveX control

8. win2k and changing network passwords

9. How to handle messages for child window inside ATL control while in design mode?

10. tab order problem (dialog with activex inside other dialog)

11. Message handler for a control in another class than the dialog class

12. How to represent the contained object inside a container class

13. export dialog class with activex control in extension dll