3,860 questions with C++-related tags

Sort by: Updated
0 answers

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…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,860 questions
asked 2025-02-21T16:47:57.1233333+00:00
ChuckieAJ 241 Reputation points
edited the question 2025-02-21T21:25:27.09+00:00
ChuckieAJ 241 Reputation points
3 answers

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…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,860 questions
asked 2025-02-18T22:47:49.76+00:00
Theodore Sung 0 Reputation points
answered 2025-02-21T18:56:33.3466667+00:00
Theodore Sung 0 Reputation points
1 answer One of the answers was accepted by the question author.

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…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,942 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,860 questions
asked 2022-06-13T02:36:40.78+00:00
Yang Yang 46 Reputation points
edited a comment 2025-02-21T15:44:16.8666667+00:00
Brian Johnson 0 Reputation points
0 answers

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…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,860 questions
asked 2025-02-21T12:00:27.3433333+00:00
Klajderic Aljosa HSLU I 0 Reputation points
edited the question 2025-02-21T12:21:55.4+00:00
Klajderic Aljosa HSLU I 0 Reputation points
1 answer

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…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,734 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,860 questions
asked 2025-02-05T01:22:18.9666667+00:00
Geoff Hale 0 Reputation points
edited a comment 2025-02-21T06:17:15.0633333+00:00
Roy Li - MSFT 34,091 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

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.

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,860 questions
asked 2025-02-20T17:25:10.71+00:00
ChuckieAJ 241 Reputation points
accepted 2025-02-20T21:54:03.7766667+00:00
ChuckieAJ 241 Reputation points
0 answers

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…

Outlook
Outlook
A family of Microsoft email and calendar products.
4,504 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,860 questions
asked 2024-10-11T05:58:27.6133333+00:00
Dave 206 Reputation points
commented 2025-02-20T21:22:01.6733333+00:00
Classen, Brian 0 Reputation points
4 answers

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…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,447 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,860 questions
asked 2025-02-13T04:21:25.4333333+00:00
Bryan Kelly 401 Reputation points
commented 2025-02-20T07:43:45.2+00:00
Minxin Yu 12,841 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

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…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,734 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,860 questions
asked 2025-02-14T18:32:24.68+00:00
ChuckieAJ 241 Reputation points
accepted 2025-02-19T14:36:30.57+00:00
ChuckieAJ 241 Reputation points
0 answers

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+?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,734 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,860 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,804 questions
asked 2025-02-07T02:22:18.55+00:00
lam nguyen 0 Reputation points
commented 2025-02-19T06:20:05.1233333+00:00
Roy Li - MSFT 34,091 Reputation points Microsoft Vendor
0 answers

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) :…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,860 questions
asked 2025-02-13T19:55:45.0833333+00:00
Noah Aas 625 Reputation points
commented 2025-02-18T15:52:36.7166667+00:00
RLWA32 47,256 Reputation points
1 answer

how to change country settings microsoft webview2 in c#

i want to change country settings mc edge webview2 with code

Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,466 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,305 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,860 questions
asked 2025-02-14T20:08:37.1366667+00:00
nadirfly 21 Reputation points
commented 2025-02-17T03:26:06.66+00:00
ShiJieLi-MSFT 11,741 Reputation points Microsoft Vendor
3 answers

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,…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,447 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,860 questions
asked 2025-02-12T15:45:43.4933333+00:00
Nigel Hoult 0 Reputation points
commented 2025-02-14T22:33:18.9066667+00:00
Nigel Hoult 0 Reputation points
1 answer

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?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,447 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,860 questions
asked 2022-11-16T13:17:43.917+00:00
Itay Shwartz 1 Reputation point
edited the question 2025-02-13T10:19:47.5366667+00:00
Itay Shwartz 1 Reputation point
1 answer

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…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,447 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,860 questions
asked 2024-11-13T12:56:41.03+00:00
Andrei Hanganu 0 Reputation points
answered 2025-02-13T04:01:58.5866667+00:00
寿猛 韦 0 Reputation points
1 answer One of the answers was accepted by the question author.

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…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,860 questions
asked 2025-02-11T21:06:58.2866667+00:00
ChuckieAJ 241 Reputation points
accepted 2025-02-12T13:30:35.37+00:00
ChuckieAJ 241 Reputation points
1 answer

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++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,860 questions
asked 2025-02-08T14:21:59.67+00:00
ChuckieAJ 241 Reputation points
edited an answer 2025-02-11T14:47:26.4433333+00:00
ChuckieAJ 241 Reputation points
2 answers One of the answers was accepted by the question author.

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…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,447 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,860 questions
asked 2024-01-08T10:57:35.0433333+00:00
Mohammad Mohsin Siddiqui 175 Reputation points
edited a comment 2025-02-11T09:50:31.2466667+00:00
Hopkins, Piers 0 Reputation points
4 answers One of the answers was accepted by the question author.

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…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,734 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,860 questions
asked 2025-02-03T11:30:25.02+00:00
ChuckieAJ 241 Reputation points
edited the question 2025-02-11T02:58:35.7333333+00:00
Roy Li - MSFT 34,091 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

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…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,734 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,860 questions
asked 2025-02-04T11:35:15.4433333+00:00
ChuckieAJ 241 Reputation points
edited the question 2025-02-11T02:58:15.14+00:00
Roy Li - MSFT 34,091 Reputation points Microsoft Vendor