How to detect Windows dark mode
In the Windows settings, dark mode is enabled for Windows and light mode is enabled for applications. The following keys are missing from the registry: HKCU\Microsoft\Windows\CurrentVersion\Themes\Personalize. …
Windows API's CreateFile with CFile gives invalid path error if used drives created with SUBST
A drive is created for a folder using SUBST command. We have a Windows application which reads contents of the and performs some operations. Application does not give any error when read the file path is from actual drive. But when try to read from drive…
How to prevent audio to be sent to the default audio endpoint?
Hi, I've some audio that I would like to only be sent to a particular audio endpoint (in this case, a controller output). I basically use IMMDeviceEnumerator::EnumAudioEndpoints() to get the endpoint I want and send audio to the device buffer using…
Looking for examples of using Rust language to make a Explorer Shell extension
I want to use Rust language for Windows Explorer shell extension development, but have no idea where to start. So, I'm looking for an FOSS Rust language based Windows Explorer shell extension to learn from Specifically, I want an FOSS project that uses…
How do I display a transparent custom bitmap on a toolbar button in a Win32 C++ app?
I'm trying to add a button with a custom transparent bitmap to a toolbar in my Win32 C++ app. I'm using the following code to create and populate the toolbar. toolBar = CreateWindowEx(0, TOOLBARCLASSNAME, nullptr, WS_CHILD, 0, 0, 0, 0, hwnd,…
Window appears with old-style UI and no text in titlebar.
I'm developing a middleware for D that is quite similar to SDL/SFML, here's an exempt from the window creation code: class OSWindow { [...] this(io_str_t title, io_str_t name, int x, int y, int w, int h, ulong flags, WindowBitmap icon = null, OSWindow…
How can I be sure my Windows desktop application is signed with a timestamp?
We use DigiCert to create certificates for our Windows desktop apps. The certificate expires in June, and I want to make sure this won't impact the users on the existing versions they use, and the digital signature on the file will remain valid even…
Porting SetTransform function in DirectX 9 to DirectX 11 or 12
Iam porting an existing project with DirectX 9 to DirectX 11 or 12, I am trying to port the function SetTransform from DirectX 9, there is no reference found in DirectX 11 or 12, please kindly suggest where to find the above function and how to define…
Does PostQuitMessage(0) deallocates all the memory allocated for widgets in main thread?
Hi, I'm working on a CPP win32 application. We are developing a multi windowed application. When we want to force quit the application, we use PostQuitMessage(0) which stops the event loop and all the window visible will be closed. But by doing this will…
GDI+ PrivateFontCollection::AddMemoryFont failed to load fonts
GDI+ PrivateFontCollection::AddMemoryFont fails to load fonts and returns a status of InvalidParameter = 2. I made sure that my resources were correct as I also saved them locally, but the ttf fonts are correct. What is the problem please? My code and…
What is the recommended approach for checking low battery events in Windows?
Hi, I am developing an application and need to register for a low-battery event in Windows. I have reviewed the PowerSettingGUIDs documentation and found a value named GUID_POWER_SAVING_STATUS. Reference:…
How to get the exception context address from a crashed process using its handle
we are able to launch a dump collection tool for jni crashes using jvm option -XX:OnError. But like we get a jit address passed to the jit debugger in win32 app crashes we dont get it from jvm. Is there an api to get the crash exceptio n context…
Junk characters issue when trying to read Thai resources (.rc) in Windows App
I am working on the development of a windows app where when the .rc file used in this project is localized in thai junk characters appear on the app UI. We are using ANSI based rc files in this project. I understand that for my app to work I need to…
Apply changes made in registry regarding window metrics
I want to set specific values for: Computer\HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics Is there a way to apply registry changes without the need of logging off and on? Perhaps some service needs restarting? I've tried to restart explorer.exe…
How to get specific image coordinates from within bitmap
hi Is there a special (Library/Class) for such an achievement? which can find and return the coordinates by giving a symbol of a specific image from within the larger image
When modify the keyboard layout of explorer.exe by WM_INPUTLANGCHANGEREQUEST, the keyboard will always be automatically reverted to ENG
I am using SendMessage in AHK v2 (Sorry but I have not yet mastered the syntax for hooking the keyboard and using Windows API in other languages. ) to call WM_INPUTLANGCHANGEREQUEST in order to create a quick input method switcher. When tested in other…
How to Increase/Decrease mouse pointer moving speed on a WPF application surface?
Hi there, I have a simple WPF application where I need to control the mouse pointer speed. Suppose I run the application and as soon as my mouse pointer enter the application area, the mouse pointer speed should be increase and I want some more…
Identify display orientation (flipped or not) in Win32 app
Hello, In Win32 app, I want to capture event when display orientation is changed. below is the sample code snippet to get an idea: LRESULT CALLBACK WindowProc(HWND hWnd, UINT messageCode, WPARAM wParam, LPARAM lParam) { switch (messageCode) { …
EvtSubscribe has strange behavior when using query criteria with EventRecordID.
When using EvtSubscribe from winevt.h referencing the example code from here with query string including EventRecord ID(e.g. "Event/System[EventRecordID>10000]", it looked like it is working as expected. However, when getting future events,…
NCryptCreatePersistedKey - Any property to set User Reauthentication before Access?
NCryptCreatePersistedKey has ability to set properties on the key. I have tested with UI settings for prompting for Allow/Deny. Also I have seen UI settings for PIN/Password. But I simply want the ability for a user to validate themselves like UAC before…