3,842 questions with C++-related tags

Sort by: Updated
4 answers

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…

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,842 questions
asked 2025-02-03T11:30:25.02+00:00
ChuckieAJ 96 Reputation points
answered 2025-02-04T14:33:18.5133333+00:00
Castorix31 86,611 Reputation points
0 answers

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…

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,842 questions
asked 2025-02-04T11:35:15.4433333+00:00
ChuckieAJ 96 Reputation points
1 answer

SetSystemCursor not honoring cursor size

I'm currently trying to set the system cursor to loading cursor while I'm processing certain information on my software then restoring the default cursor. But I'm facing an issue when my computer accessibility configuration has the size of mouse computer…

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,723 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,842 questions
asked 2025-01-23T20:07:56.85+00:00
Julian Castillo 0 Reputation points
commented 2025-02-04T09:21:47.51+00:00
Jeanine Zhang-MSFT 10,526 Reputation points Microsoft Vendor
0 answers

Unexpected AfxThrowFileException in CStdioFile::Read()

I am using CStdioFile::Read in an MFC application, and I noticed that an exception is thrown in the following condition: if ((nRead = (UINT)fread(lpBuf, sizeof(BYTE), nCount, m_pStream)) == 0 && !feof(m_pStream))     …

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,842 questions
asked 2025-02-03T10:55:36.34+00:00
Praveena S Kumar 20 Reputation points
commented 2025-02-04T09:19:47.75+00:00
RLWA32 46,756 Reputation points
3 answers

Is Microsoft plans to support "Dark Mode" in its own application

Hi, ALL, More and more people are switching to use "Dark Mode". However, it looks like native Windows applications are not supporting "Dark Mode" as they use different coloring scheme. Does MS have plans to update…

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,842 questions
asked 2023-01-05T17:02:43.327+00:00
Igor Korot 51 Reputation points
answered 2025-02-03T19:50:51.3866667+00:00
ChuckieAJ 96 Reputation points
1 answer

Windows 11 22H2 has a different way of using the JS engine?

Dear support, Our company has a solution built on a WebBrowser that will use the JS engine. After upgrading to Windows 11 22H2, we found that the solution behaves differently from before. We did some research, and then found that Windows 11 22H2 has…

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,266 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,842 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,634 questions
asked 2022-11-02T01:24:42.513+00:00
Julie Jiang 11 Reputation points
edited a comment 2025-02-03T15:06:30.3266667+00:00
Davide Capodaglio 0 Reputation points
0 answers

Why SetWindowCompositionAttribute makes text also transparent

When I called SetWindowCompositionAttribute to make the main window blurred, text of controls on it also became transparent and thus hard to read. I want to keep the text pure black without transparency while the main window is blurred and transparent.…

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,723 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,842 questions
asked 2025-02-03T03:24:51.68+00:00
szx0427 101 Reputation points
commented 2025-02-03T12:21:47.6466667+00:00
David Lowndes 2,575 Reputation points MVP
1 answer One of the answers was accepted by the question author.

Can we set preview of Drag-and-Drop before drag event in WinUI2?

Hi, I'm working on WinUI2 application with Xaml Island in C++. Suppose we've one draggable TextBlock and when we drag it, we can see some preview moving with the mouse pointer moving. In order to set that preview I'm doing in DragStarting handler as…

Universal Windows Platform (UWP)
Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
817 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,842 questions
asked 2025-01-13T12:48:42.26+00:00
Shyam Butani 355 Reputation points
edited the question 2025-02-03T09:43:22.9233333+00:00
Roy Li - MSFT 33,671 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

Unpairing a Bluetooth LE is not working

I use VS C++ 2015-2022 Redistributable (x64) 14.40.33810 with Windows SDK version 10.0.226100.3233, I am able to pair with a BLE device using the UWP API, but I have had absolutely no luck in unpairing the device. I am in need of an urgent help. Thank…

Universal Windows Platform (UWP)
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,842 questions
asked 2025-01-24T17:50:43.28+00:00
F FARAH 20 Reputation points
edited the question 2025-02-03T08:08:10.3933333+00:00
Jack J Jun 24,636 Reputation points Microsoft Vendor
0 answers

ICoreWebView2GetCookiesCompletedHandler is not called if the WebView is idle

Hello, I am using ICoreWebView2CookieManager and am trying to fetch a list of cookies via GetCookies. If i have a WebView that is constantly navigating to various pages it is eventually called. But if i have a hidden WebView, that does nothing but idle.…

Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,442 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,842 questions
asked 2025-01-29T12:29:56.9433333+00:00
Balash, Omer 1 Reputation point
edited a comment 2025-02-03T01:59:53.92+00:00
Minxin Yu 12,506 Reputation points Microsoft Vendor
2 answers

Full duplex operation, functions C++ C#

I have a C# application and a C++ application. Between the two, data should now be exchanged. In C# ReceiveDataFromCPP(String data) SendDatatoCPP(string data) In C++ ReceiveDataFromCSharp(String data) SendDatatoCSharp(string…

.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
342 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,266 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,842 questions
asked 2025-01-30T18:47:23.8+00:00
Noah Aas 585 Reputation points
answered 2025-02-02T16:16:36.61+00:00
RLWA32 46,756 Reputation points
1 answer One of the answers was accepted by the question author.

Using C++, I want to remove (not deny) Write permission alone from a user trustee with Full Control permission in Windows NTFS Folder.

I want to implement a C++ program that removes the "Write" permission alone for a user trustee with "Full Control" permission over a folder on a Windows NTFS drive. I tried to use the SetEntriesInAcl() function from the aclapi.h…

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,763 questions
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,723 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,842 questions
Windows 10 Security
Windows 10 Security
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
2,995 questions
asked 2025-01-31T07:07:53.5766667+00:00
Praveenkumar S 20 Reputation points
accepted 2025-02-01T11:43:28.15+00:00
Praveenkumar S 20 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,403 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,842 questions
asked 2024-10-11T05:58:27.6133333+00:00
Dave 196 Reputation points
commented 2025-01-29T19:45:30.6566667+00:00
Constantinos Iliopoulos 0 Reputation points
1 answer

Why am I getting the compile error code 2248 for a friend function to a nested class?

Hello, I am developing a cross platform library and I am running into a compile error which I only get in Windows and not Linux. I have declared the operator<<() as a friend inside of a class which has a nested struct within it. However, the…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,398 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,634 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,842 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,634 questions
asked 2024-09-17T16:17:28.97+00:00
w.t.s 0 Reputation points
commented 2025-01-29T02:19:39.14+00:00
w.t.s 0 Reputation points
1 answer

Any other way to open UMCP prompt while the user logon, without enable UMCP flag and unexpired password using custom credential provider in C++

I am using custom credential provider and I have to validate password on user logon with my custom validation condition if the password failed my condition I have to open the User must change password prompt by without enable UMCP flag in AD. There is…

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,634 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,844 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,842 questions
asked 2023-07-26T09:42:56.0866667+00:00
Vishnu 0 Reputation points
accepted 2025-01-28T09:40:49.2766667+00:00
Vishnu 0 Reputation points
0 answers

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,398 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,842 questions
asked 2024-11-13T12:56:41.03+00:00
Andrei Hanganu 0 Reputation points
commented 2025-01-27T11:05:18.0333333+00:00
Andrei Hanganu 0 Reputation points
0 answers

How to disable auto warning focus in Visual Studio 2022 C++

How can I disable this? When I press build, visual studio is focuses on the first warning / error. It is really annoying. Thanks, Fabo

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,398 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,842 questions
asked 2025-01-24T10:22:36.2333333+00:00
Zsolt Fabian 0 Reputation points
edited a comment 2025-01-27T07:35:44.2633333+00:00
Tianyu Sun-MSFT 32,696 Reputation points Microsoft Vendor
0 answers

Why do I have problems when trying to import a header unit?

I used VS Developer PowerShell to create a header unit file from a header file. cl /std:c++20 /exportHeader /headerName:quote HeadersBase.h Not sure if that was the right thing to do. Then I created an empty project to see if I can import the header unit…

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,763 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,842 questions
asked 2024-12-30T21:49:19.45+00:00
CDev-8220 220 Reputation points
commented 2025-01-25T13:01:43.96+00:00
CDev-8220 220 Reputation points
3 answers

Best C and C++ Code Obfuscator?

Hi, Which are most advanced obfuscators for C and C++ to protect code? Thanks

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,842 questions
asked 2023-02-10T06:23:26.4933333+00:00
Mann Alex 5 Reputation points
edited a comment 2025-01-24T14:34:36.04+00:00
Khan 0 Reputation points
2 answers One of the answers was accepted by the question author.

Disable pause after execution 2

What happened to the first post where I asked this question? Why are there still these puzzle verifications when posting? -- It's been asked for years, and I was wondering if something has finally been done about it. I'd like after an execution of a c++…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,398 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,842 questions
asked 2025-01-09T19:09:28.4033333+00:00
z l 20 Reputation points
edited the question 2025-01-24T01:35:36.39+00:00
Jack J Jun 24,636 Reputation points Microsoft Vendor