Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I have an MFC application that load an MFC dll as a plugin.

Now, I want to add some new methods to the FrameWnd of the appication using this dll.

I can access to the frame window only with a pointer to it:

CFrameWnd* pFrameWnd = (CFrameWnd*)pWnd;


I have create a CFrameWnd driven class (CMyFrameWnd )in the dll and now I want to change the CframeWnd class of the application to this new class dynamically at run time.

Is there any way to do this?

Or, Is there any way to add some new methods to CFrameWnd of application using dll?

Thanks,
Mochenoo
Posted
Comments
Richard MacCutchan 5-Mar-14 5:06am    
Use the new class in your application, rather than the base class.
mochenoo 5-Mar-14 5:13am    
Unfortunately, I don't have the source of application.

I'm developing a plugin for the app.
Richard MacCutchan 5-Mar-14 6:39am    
Sorry, but I have no idea how the app works or how it would use this DLL. If you want help then you will need to provide more details of how the two parts interact.

1 solution

The whole idea is wrong. You got some misconception and trying to ask an implementation question based on it. The advice is only one: learn programming fundamentals and OOP. See also my comments to this answer:
CframeWnd to custom CFrameWnd dynamically at Runtime[^].

And again, remember that re-posts are considered as abuse, by apparent reasons. You got inadequate answer just because my preoccupation with the idea that the question was more reasonable. Which wasn't the case. :-)

Instead of re-posting, do the dialogs in comments and try to modify the question; it will put it back to the top of question list.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900