How to get ocx path inside MFC ActiveX Control

How to get ocx path inside MFC ActiveX Control

Post by ss » Fri, 18 Jul 2003 20:17:53



Dear Friends,

Does anybody know how to access ActiveX Control file path
(ocx file path) dynamically inside ActiveX Control. Is
there any API or any method is present please suggest me.

Thanks in advance,
ss.

 
 
 

How to get ocx path inside MFC ActiveX Control

Post by Alexander Shargi » Fri, 18 Jul 2003 20:47:46


You can use GetModuleFileName method. HMODULE of your control is passed to
DllMain function. So you should store it for future use.

--
Sincerely,
Alexander


http://www.RSDN.ru - Russian Software Developer Network


Quote:> Dear Friends,

> Does anybody know how to access ActiveX Control file path
> (ocx file path) dynamically inside ActiveX Control. Is
> there any API or any method is present please suggest me.

> Thanks in advance,
> ss.


 
 
 

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

Hi.
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

P.S.

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. Trumpet + TCP/IP (Wolverine) = Crash

3. MFC ActiveX/OCX Creation Wizard; also MFC/OCX Books

4. IE 5.5 and 6.0 crashing

5. How do I send keystrokes to ActiveX automation object inside an MFC container

6. lost cd disk

7. Help! - Using DAO inside OCX controls

8. Where are the password's kept..?

9. Using DirectShow inside an ActiveX control...

10. Problem with ActiveX control inside CWnd

11. Get return values from ActiveX Controls inside IE3

12. ActiveX controls which are also ActiveX control containers

13. ActiveX control within another ActiveX control?