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 […]
Win32 Programming – How to create a simple Console based application?
Microsoft Windows’s Win32 API (Application Programming Interface) is mainly for developing applications on 32-bit Windows platforms. As we have 64-bit systems, Win32 also introduced API functions for 64-bit applications. So, using Win32 API we can develop both 32-bit and 64-bit applications. Programming using Win32 API is a bit difficult compared to programming using MFC (Microsoft […]
Visual C++: Exporting functions from a DLL using “__declspec(dllexport)” keyword.
DLL – Dynamic Link Libraries are the shared libraries those can be used by multiple applications, at a time. In this article we are going to discuss the steps to export functions from a DLL. So, the exported functions can be called from other programs. What functions to export from the DLL? That thing you need to […]
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”. […]