CodeSteps

Python, C, C++, C#, PowerShell, Android, Visual C++, Java ...

MFC

MFC – The device context classes

Windows device context is the key GDI element that refers a physical device. Device contexts are used to draw to the physical device; screen, printer, etc,. MFC provides different wrapper classes; and each class is associated with Windows device context. Through this article, we are going to discuss different MFC’s Device Context classes. CDC class […]

MFC – CObject class – Enable Object Diagnostic support

In our previous articles we have discussed about CObject‘s “run-time class information”, “serialization support” and “dynamic object creation” features. In this articles I am going to discuss about CObject‘s “object diagnostic support” feature. Object diagnostic feature is useful to provide additional information about the objects; usually this information will be displayed in the output window in the integrated […]

MFC – How to create user-defined messages and their message handlers?

Windows based user interface applications are message driven. When a message is generated, its associated message handler will be executed. MFC (Microsoft Foundation Classes) framework enables to write message driven applications more easily. MFC provides CCmdTraget class for this purpose. In this article I am going to explain the steps to create user-defined messages and […]

MFC – CObject class – Enable Dynamic Object creation

As of now, we have discussed CObject class features “run-time class information” and “serialization support” in our previous articles MFC – CObject class – An Introduction – Enable Run-time class information and MFC – CObject class – Enable Object Serialization respectively. In this article, I am going to discuss CObject‘s another feature “dynamic object creation”. […]

Visual C++ – How to create modal dialog and modeless dialogs using MFC ?

MFC (Microsoft Foundation Classes) provides classes to deal with dialogs. Dialog boxes are very useful to take user inputs, displaying and allowing the users to change configuration settings, displaying messages or warnings or errors etc.,. Dialogs are classified into two types depending on their behavior. One is modal dialog and another one is modeless dialog. […]

MFC – CObject class – Enable Object Serialization

CObject supports object serialization. One of the MFC’s great feature, which allows to store and retrieve the object’s current state. To enable this feature in our code: We must add DECLARE_SERIAL macro into our class declaration. IMPLEMENT_SERIAL macro must be added into class implementation file. And override the Serialize member function. Lets extend our class […]

MFC – CObject class – An Introduction – Enable Run-time class information

CObject is the base class for almost all classes in Microsoft Foundation Class (MFC) library. A class is qualified as a MFC based class by deriving its from MFC’s base class CObject. Once the normal class is derived from CObject class; it inherits the following services offered by CObject class. Run-time class information Serialization support […]

MFC – Convert C++ Class to MFC based class

Microsoft Foundation Classes (MFC) are used to develop Windows based applications. MFC supports Document-View architecture; where data management separates from presentation layer. MFC wraps portions of Windows API C++ classes and enables to use them easily. In this article, we will discuss how to enable MFC to a simple C++ class. Let’s take a simple […]

Scroll to top