How to switch off Show Always for a CMFCPropertyGridCtrl (or change the colour)?
I confess that I have also asked the same question on StackOverflow, but it has not had any responses. CListCtrl lets you switch off Show Always by using LVS_SHOWSELALWAYS. CTreeCtrl also lets you switch off Show Always by using…
How does Visual Studio decide on the field names in a C structure when doing a quick watch on the structure?
Programming in C. I was curious how/where Visual Studio is determining the field names of a structure when one does a quick watch on the pointer to the structure's memory. The reason is a bit odd but here it is: we have a client facing structure that…
Is there a sample MAUI application to call c++ libarary
I have a cross-platform library written with C++, I use this library to create model and display it with OpenGL. Now I'd like to choose MAUI to create a desktop application and call above library to complete interactions. Now I need a sample for…
Sporadically receiving MQTTRecvFailed error [Azure IoT middleware]
Hello, I'm doing endurance testing on the Azure IoT middleware for the FreeRTOS SDK (link). I am thinking of using the library for our application. I've modified the esp32 sample_azure_iot_pnp example for the test. Currently, the endurance test sends 4…
In C++, are global objects guaranteed to exist throughout the execution of a SetConsoleCtrlHandler() callback function?
In C++, are global objects guaranteed to exist throughout the execution of a SetConsoleCtrlHandler() callback function? I'm wondering what would happen if both regular program execution (and the eventual destruction of global variables) and the…
How to remove the CStatusBar separators from ownerdraw statusbar?
I am using an ownerdraw CStatusBar in my project: In the DrawItem override I render the icons and text. But how do I hide the vertical separators? Is it a style setting? Since I am not drawing them myself.
Zombie COM Surrogate (WinInetCacheServer) processes when running MAPI in a 64-bit MFC Application via Task Scheduler
I have a 32-bit C++ MFC Windows application that calls MAPI via the Windows MAPI API. Recently, I compiled the application to 64-bit, and it runs fine when launched manually. However, when I schedule the same 64-bit version to run via Windows Task…
Create C++ GUI project
Windows 11, VS Professional 2019, Version 16.11.44, C++ I want to create a project that starts up with a GUI. Select project template: Windows Desktop Application. The text states: A project for an application with a graphical user interface that runs…
CComboBoxEx in dark mode (with Dropdown style) in MFC
I am trying to implement a dark mode for my application, by using DarkMode_Explorer / DarkMode_CFD etc. I have handled OnCtlColor and set the theme using SetWindowTheme. If my CComboBoxEx is a DropList then it renderings properly. But when I set it to…
How to apply ROPs (Raster Operation) when drawing with GDI+ and do we need to use ROPs with GDI+?
I am doing drawing image to EMF file using GDI+ however I don't see any function of GDI+ related to ROPs. I understand that GDI+ is designed with object oriented thinking and supports high quality graphics. So do we need ROPs when using GDI+?
C++, MFC loop until value is valid or timeout
I am looking for a good way to check a value within a period of time. In principle, the code below works. Are there possibilities with CTime, MFC functions? Why is this written? atlTraceGeneral Is that the TRACE macro? time\timedlg.cpp(186) :…
how to change country settings microsoft webview2 in c#
i want to change country settings mc edge webview2 with code

How to iterate through files on USB device with Visual C++
I'm trying to write a program that will open the root directory of a USB device that appears in Windows Explorer as a file system (specifically, an iPhone) and then iterate through the files on it. I have successfully used SetupDiGetClassDevs,…
fatal error C1069: cannot read compiler
Hi I'm getting this error: fatal error C1069: cannot read compiler what should I do to fix it?
After VS2022 version 17.12.0 update Address Sanitizer no longer works for my C++ project
I've just updated visual studio to the version in the topic and the project which worked ok 5 minutes ago with Asan on (/fsanitize=address) now throws this error when starting the debugger: The procedure entry point __sanitizer_ignore_free_hook____dll…
Adding dark mode to dynamically added sub-menus
I have a CMFCMenuButton on my dialog which is set to the DarkMode_Explorer theme. Therefore, when the dropdown menu part is display it is correctly showing with dark backgrounds. The only caveat is that there is one instance where I load another menu…
Unable to use NM_CUSTOMDRAW for radios / checkboxes in a child CMFCPropertySheet / CMFCPropertyPage
I am trying to add a dark mode theme to derived CMFCPropertySheet class. There are a couple of issues, but I will restrict this to one of them. The problem I have is related to the resolution provided here about rendering checkboxes and…
C++ Code coverage in Visual Studio Professional IDE
We are currently using Visual Studio Professional edition as an IDE for our organization. Recently we came to need to have code coverage for our C++ code base. And we found that there is none support (as far as I could find out) in the professional…
Unable to set my CStatusBar background colour
I am surprised that I can't do this because the File Explorer in Windows 11 has a dark statusbar. So initially I tried: SetWindowTheme(m_wndStatusBar.GetSafeHWnd(), L"DarkMode_Explorer", nullptr); And it did nothing. I then tried: // Set dark…
Drawing Check Box and Radio controls on a CDialogEx for Dark Mode (Win32)
If I switch off the theme for my checkbox / radio controls with: SetWindowTheme(hControl, L" ", L" "); I then get the text colours as I would like, but the actual check / radio symbols are drawn differently: If I don't switch off…