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…
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…
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)) …
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…
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…
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.…
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…
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…
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.…
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…
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…
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…
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…
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…
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…
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
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…
Best C and C++ Code Obfuscator?
Hi, Which are most advanced obfuscators for C and C++ to protect code? Thanks
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++…