An embedded Windows GUI application (plug-in and play GUI) | CodeGuru

An embedded Windows GUI application (plug-in and play GUI)

Environment: VC5.0/4.0, Win95/98, NT4.0 This is a Windows GUI application which has the ability to embed different functionality sub-module and manage them. The main module and sub-modules commonly are Document-View window frame. This design is similar to COM mechanism, but directly and simply use DLL to realize the sub-module. The method to put Document-View child […]

Written By
CodeGuru Staff
CodeGuru Staff
Apr 18, 1999
2 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: VC5.0/4.0, Win95/98, NT4.0

This is a Windows GUI application which has the ability to embed different
functionality sub-module and manage them. The main module and sub-modules
commonly are Document-View window frame.

This design is similar to COM mechanism, but directly and simply use DLL to
realize the sub-module. The method to put Document-View child window module
to DLL can refer JS Byju’s article Separating the views of an MDI application into
different DLLs

First, design a set of base-class with standard inferface functions, they
are export base classes CStandardDoc, CChildFrame, CStandardView, and export
functions InitTemplate, GetModuleData. All embeded sub-modules’ windows
classes and main module windows classes are derived from these base class.
At run time, all sub-modules’ windows’ View share the main module’s Document
object, so the control and data exchange between sub-module and main module
or sub-module and sub-module are implemented by the Document in main module
and Views in sub-module. The CStandardDoc has the member function
GetMsgFromView to get information from sub-module View and use
UpdateAllView to broadcast the message to all View. The CStandardView has
the member function GetMsgFromDocument and OnUpdate for sub-modules’ View
to receive message from the Document of main module.

This demo is a multimedia type Windows application, one main module, a bitmap
show sub-module, a simple math game module and a 3D animation mdoule. The
sub-modules are independent, they can be pluged in main module daymaniclly.
The config.exe in the demo allow the user decide which sub-module is embeded
to main module, which one not.

Download demo project – 74 KB

Download source – 123 KB

Date Last Updated: April 18, 1999

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.