Persisting Login Credentials in MFC Dialog Applications with INI Files

Overview This guide demonstrates how to store and retrieve user authentication data in MFC-based desktop applications using profile configuration files. The implementation automatically populates login fields on dialog initialization and saves credentials upon successful authentication, eliminating manual re-entry for subsequent sessions. Core ...

Posted on Tue, 08 Sep 2026 16:25:09 +0000 by TJaaaay

Customizing MFC Progress Bars with Inline Percentage Rendering

To display precise numeric progress values directly on a standard MFC progress control, derive a new class from CProgressCtrl and intercept its paint routine. The default control lacks native support for overlaying formatted text, so custom GDI drawing is required within the overridden OnPaint handler. Drawing onto the control ivnolves acquirin ...

Posted on Sat, 01 Aug 2026 16:42:51 +0000 by daven

Rendering Text Output Using CDC in MFC Applications

Overview The CDC (Device Context) class in MFC provides comprehensive functionality for text rendering operations. As a wrapper around Windows GDI functions, CDC handles everything from text positioning to font management. Core Text Rendering Functions DrawText The DrawText method formats and draws text within a specified bounding rectangle. It ...

Posted on Fri, 26 Jun 2026 17:10:36 +0000 by tobias

A C++ INI File Reader/Writer Class Supporting Multiple Data Types

The CIni class is composed of two files: ini.h and ini.cpp. It suports reading and writing various data types, including binary data. ini.h #pragma once #define SER_GET(bGet,value) SerGet(bGet,value,#value) #define SER_ARR(bGet,value,n) SerGet(bGet,value,n,#value) #define SER_GETD(bGet,value,default) SerGet(bGet,value,#value,NULL,default) #def ...

Posted on Thu, 21 May 2026 20:51:41 +0000 by Matt Parsons