GUI MFC Framework inside ATL DLL server | CodeGuru

GUI MFC Framework inside ATL DLL server

. Environment: Windows NT, 9x   Visual C++ 5, 6 I built this application with VC5. I don’t think there should be a problem comiling it with VC6. This MFC GUI framework is placed inside ATL DLL server and is invoked by parent application. Parent application manages this window and when parent application terminates so […]

Written By
CodeGuru Staff
CodeGuru Staff
Jan 14, 2000
1 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

.

Environment: Windows NT, 9x   Visual C++ 5, 6

I built this application with VC5. I don’t think there should be a problem comiling it
with VC6.

This MFC GUI framework is placed inside ATL DLL server and is invoked by parent
application. Parent application manages this window and when parent application terminates
so does this embedded window. It behaves much like Microsoft’s Outlook Email and Forms,
which appear to be a standalone frame/view/doc and which is managed by parent Outlook
application.

Whats in it for you? Lots! First – You have only one invoking method inside parent
program.After the method was implemented, this DLL can be completely developed standalone
(no need to recompile parent app). You can create hundreds of these dlls with frame
windows inside and enjoy nice scalability of you parent app. Web applications with
doc/view features. Etc. Etc. Etc.

1. I created a MFC single document application with app wizard.

2. Edit InitInstance() function add these lines:

//*********************************

if (!AfxOleInit())

{

AfxMessageBox("Failed to load OLE");

return FALSE;

}

CoInitialize(0);

//*********************************

3. Add ExitInstance() virtual function and insert
there this line:

//****************

CoUninitialize();

//*****************

4. Refer to the code in the ATL project how to implement framework.


                     

Downloads

After unzipping files run batch file to register gui.dll. If you compile this project
registration shoul be done automatically.

Downloads

Download demo project – 92 Kb

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.