How to Get Visual C++ Sample Projects (2)

In a previous article I showed how to get Visual C++ sample projects either by using Visual Studio IDE or by downloading from MSDN – Developer Code Samples site. Recently, I found that we can also download an archive containing a very large number of sample projects from GitHub. Pretty cool! Here is the magic … Read more

Visual Studio 2015: How to Step into MFC Framework Code

Let’s say we have installed Visual Studio 2015 and  have started an MFC application in DEBUG mode. Now, attempting to step into an MFC Framework function, e.g. CWinApp::InitInstance, the debugger simply steps over. Having a look into Output window, we may discover a message like this: “…’C:\Windows\System32\mfc140ud.dll’. Cannot find or open the PDB file”. That’s … Read more

Using Lambdas in MFC Applications – Sorting Arrays

Beginning with Visual Studio 2010 which supports lambda expressions introduced by C++11 standard, you can handily sort an MFC array like in the following example: Sorting CStringArray by using a lambda expression // Example #1 // … CStringArray arr; arr.Add(_T(“John”)); arr.Add(_T(“Zorro”)); arr.Add(_T(“Sandy”)); arr.Add(_T(“Jimmy”)); // … bool bAscending = true; // … std::sort( arr.GetData(), // position … Read more

Command Link Button Control

What are Command Links? Among other new controls supported in Windows Vista and newer Windows versions, we can find  Command Link controls, that contain: an icon; a label text; an additional explanatory text. In fact, it is a common Windows button control (of class “Button“) that has BS_COMMANDLINK or BS_DEFCOMMANDLINK type style set. We’ll further show … Read more