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,...
Win32 Programming – Add Message Loop to the Application
In our previous article “Win32 Programming – Register the window class“, we have created our GUI based Application window and successfully displayed on the screen....
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...
Win32 Programming – How to create a simple GUI based application?
By adding Graphical User Interface (GUI) to the applications we can change whole look and feel of the applications and users will feel more comfortable to...
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 “__declspec(dllexport)” keyword or “.DEF” file. We have already discussed about...
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...
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...
MFC – CObject class – Enable Dynamic Object creation
As of now we have discussed about CObject class features “run-time class information” and “serialization support” in our previous articles MFC – CObject class –...
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...
Visual C++ – Creating an ATL COM Component (Part – 1)
Active Template Library (ATL) is a light weight library used to develop COM based components using Visual C++. Through ATL we can quickly develop COM...
Visual Studio 2012 – Enable / Disable IntelliSense for “Visual C#”
One of the great feature of Visual Studio IDE (Integrated Development Environment) is it’s IntelliSense feature. IntelliSense provides code elements that you can select when...
COM – Creating a COM Component using C++ – IClassFactory implementation
CoCreateInstance is depends on IClassFactory to create class instances. We have looked into IClassFactory‘s methods and we have implemented these methods in our previous article. Lets include...
COM – Creating a COM Component using C++ – IClassFactory
In our previous article, we have identified that CoCreateFunction is requesting an instance of IClassFactory. Why CoCreateInstance is requesting an instance of IClassFactory? One of the goal of...
COM – Creating a COM Component using C++ – Inside CoCreateInstance
As we discussed in our previous articles, COM’s CoCreateInstance function is used to create instances for COM classes. When the client program calls CoCreateInstance to create...
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...
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...
Passing class member function as a controlling function to AfxBeginThread (VC++)!
In Visual C++, usually we use AfxBeginThread function to create a Thread which will run the piece of code concurrently. AfxBeginThread function can be useful to...
Finding files in a folder / directory using MFC!
There are couple of ways to find/search files in a folder/directory. Usually Win32 programmers use FindFirstFile & FindNextFile functions to find the files in a...
Keep Main Thread in waiting state until Worker Thread Completes (VC++)
Multi-threading is very useful to allow to execute the piece of code concurrently. There are couple of ways in Visual C++ to keep Main Thread...
OpenGL – How to draw on MFC dialog? – Complete working code
In our previous Articles, we have discussed linking OpenGL related files to the Project and prepare the MFC Dialog to display the OpenGL graphics. You...