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 […]
Win32 Programming – Register the window class
As we discussed in our previous article, we can use pre-defined window class names (eg: BUTTON, STATIC, etc.) or our own window class names, when calling the “CreateWindow” function. But in this article, we will learn to create our own window class and use the same while creating our own window. Step 1. In order […]
Win32 Programming – How to create a simple GUI based application?
By adding Graphical User Interface (GUI) to the applications we can change the whole look and feel of the applications and users will feel more comfortable accessing the GUI-based applications than the text-based or console-based applications. Win32 API provides a vast number of API functions to create and deal with Graphical User Interface (GUI) applications. […]
Visual C++: Exporting functions from a DLL using “.DEF” file.
As we discussed in our previous article, the functions in the DLL can export using the “__declspec(dllexport)” keyword or “.DEF” file. We have already discussed exporting the functions using the “__declspec(dllexport)” keyword in our previous article. In this article I am going to discuss exporting functions in the DLL using “.DEF” file. Let’s start this […]
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 – 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. […]
Visual C++ – Creating an ATL COM Component (Part – 1)
Active Template Library (ATL) is a lightweight library used to develop COM-based components using Visual C++. Through ATL we can quickly develop COM components or COM services. In this article, I am trying to explain the steps to create an ATL COM component using Microsoft Visual C++ and Microsoft Visual Studio 2012 IDE (Integrated Development […]