Does win32 PostMessage and GetMessage use release acquire fencing?
I've been looking ALL over for this information explicitly, but I can not find anything documented. Does PostMessage and GetMessage internally implement or behave like they implement atomic release acquire fencing? Specifically, does PostMessage release…
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…
Why does IPsecSaContextSetSpi0 from the WFP API seem to only accept even SPI values?
When creating an IPsec SA using the WFP API, IpsecSaContextSetSpi0 doesn't seem to accept an odd SPI value. Why is this the case? RFC 4303 Section 2.1 talks about valid SPI values for an IPsec SA. It makes no mention of odd values being invalid, and…
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 make a RichEdit control resizable in the up and down directions?
// RichEditReSizeable_cpp_win32.cpp : Defines the entry point for the application. // #include "framework.h" #include "RichEditReSizeable_cpp_win32.h" #define MAX_LOADSTRING 100 #ifndef MSFTEDIT_CLASS #define MSFTEDIT_CLASS…
DirectComposition click through in transparent areas
I have an application with DirectComposition and Direct2D that I do have a window bigger than the drawings to handle somethings like shadows underneath the rectangles. The issue that I'm having is in the transparent areas, the click-through is not…
Why does EnumDisplayMonitors Still Return just Disconnected Monitor
I'm working om win32 Desktop application in CPP and I'm checking what happens if I try to fetch Display info with EnumDisplayMonitors when All displays are disconnected! Surprisingly it is giving display info of previously connected Display. Why is this…
![](https://techprofile.blob.core.windows.net/images/bpqI_wINOUGg4BYYipkUVA.png?8D827C)
Issue with Win32 API Loading of PE Resources Containing Lowercase Letters
Issue description I am creating an abstraction layer over portable executable (PE) resources, and am trying to identify invalid inputs that should be rejected. Through testing I got the impression that certain non-ASCII lower case letters in resource…
![](https://techprofile.blob.core.windows.net/images/1P-HevJX50CFOQJZsnsiMg.png?8D86C2)
CMFCVisualManager memory leak, still there?
I see that there was a post about this in 2017 (4 years ago), but I'm wondering if it was a bug of of the solution was the correct way of handling it. I'm using VS2019. It looks like when you use a control like CMFCEditBrowseCtrl it can cause a memory…
How to extend execution of background task in WinUI 3 (analog of ExtendedExecutionSession in UWP)?
My application has a background task that performs a cleanup of unnecessary or unused system files selected by the user. However, this task takes more than 30 seconds to complete, which exceeds the standard time limit. Question: Is there any way to…
How do I force a python script to run in efficiency mode so the green leaf appears next to its' listing in TaskManager?
Hi all, as the title states, I'm looking to make a python script run in efficiency mode and it has to show the leaf in TaskManager so psutils is out (right?). I'm running cmd as administrator and I've tried using ctypes to throttle the power through…
![](https://techprofile.blob.core.windows.net/images/1P-HevJX50CFOQJZsnsiMg.png?8D86C2)
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…
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+?
IMMDevice Activation (windows-rs)
Hello, I've been trying to activate any IMMDevice, for the moment just trying to access a default audio endpoint to collect data on current audio sessions. I've attempted a few times, and no matter what IMMDevice apparently doesn't have the Activate…
write fault error writing device PRN windows 7
write fault error writing device PRN windows 7 MS-DOS oprtaing system
![](https://techprofile.blob.core.windows.net/images/1P-HevJX50CFOQJZsnsiMg.png?8D86C2)
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.…
How to get number of Virtual Desktops
Im working on a WinUI3 desktop application in cpp. I want to get the total number of Virtual desktops currently available. I didn't find any reference online for this. Is there any Win32/COM/WinrRT API that returns the total number of Virtual desktops?
How to display menu by NotifyIcon without displaying the form in Taskbar
I have a form with a NotifyIcon and a ContextMenuStrip and I want to display the menu by clicking on the notification, but unfortunately it is displayed in the taskbar. Why? I tried setting the ShowInTaskbar property to false, but it didn't work.Tip Only…
![](https://techprofile.blob.core.windows.net/images/hBj0LQgf0UCJ70ENoTldCA.png?8DB7E4)
What are different error cases in Win32 APIs
Hi, I'm working on Win32 desktop application in CPP. I'm trying to find all the error cases where a Win32 API can fail. But the documentation does not give us a clear information when can a particular API fail. It just tells to get the error status with…
![](https://techprofile.blob.core.windows.net/images/_5e-jRvlCkWlkMrV8cdbJg.png?8D8365)