How customdrawed content could make treeitems draw rectangle to fit them
I tried to reproduce in assembly one of MS official examples related to custom draw technology. from page About Custom Draw from sample SAMPLE: CustDTv Illustrates Custom Draw in a TreeView (Q248496) for now aloowed at github so here is code(language:…
Win32 context menu items issues
Hello everyone, could you please tell me what can go wrong with getting context menu items via win32? First of all, do I understand correctly that the ampersand in the name is normal? But at the same time, some elements have a localized dwTypeData, some…
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…
How to enable the accent border instead of the title bar when enabling mica effect?
I have enabled the "Display accent color on the title bar and window borders" option in Windows settings. I applied the Mica effect to my Python program using the Win32API. The window display effect, the window Style viewed with Spy++, and the…
Restrict printer selection while printing in WinUI app
In a WinUI app, I want to restrict the user from selecting any printer, only allowing a predefined set of printers. Additionally, the user should not be able to modify the print settings, such as altering the paper size or page range; they should only be…
How to run the Windows Function Example Codes independently?
I am not able to test and run the sample exemplary code of IP adapter address or for that reason any other exemplary sample codes of Windows functions. How can I independently test and check if this code helps me to get all the required information which…
Disabling or detecting the use of Desktop Duplication API
We provide software that locks down devices in order to ensure the user remains within our application, and that they don't have access to any outside resources. One class of software that we block is remote desktop clients. We block this through several…
exe should run in foreground using Task Scheduler upon crashed or restart of machine
exe should run in foreground using Task Scheduler upon crashed or restart of machine
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 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 fix graphic artefacts in this example
Theory: In this example present implementation of adding linenumbers subclass of standard EDIT control. linenumbers are sent to NC area of control, creation of NC area reached with handling WM_NCCALCSIZE message and adding 40 to left field of first RECT…
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…
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…
How to register your app in the Notifications and Actions Center of Windows 11
I am developing an app (it's a normal GUI app written in DART and C++). It is NOT a packaged UWP app. I am able to show the app's item/entry in the Windows 11 Notifications and Actions center by writing this .iss innosetup script: [Registry] Root: HKCU;…
why uiautomation findFirst is slow and can i correct it?
Hello, I want to find some ui elements in windows apps but when i find it using uiautomation findAll or findFirst it slows down programs. I undertand that there are many elements in ui and it requires going throug many elements but for example in…
Refresh rate control on IDXGISwapChain1
I play video on my application on xbox with 120Hz, but it seems to be played with 60Hz. Interval between time samples is ~16ms instead of 8ms. I checked few different videos with different fps and the result is the same (I thought that the problem is…
Where are the Samples for TAPI in the SDK as referred to in Learn. Code for C & VB etc.
Hi, Have installed the SDK, every single option ticked. I think had most before as was using Visual Studio before. As below, looking for TAPI Programs as mentioned on https://learn.microsoft.com/en-us/windows/win32/tapi/tapi-quick-start Specifically VB…
I want to disable/enable usb and HDMI port whenever my c# wpf (.net Framework 4.7.2) app runs.
Online resources are not present for above queries. I want solution for both admin/non-admin user account. Please help to provide me the solution.
Why GetBestInterfaceEx doesn't consider routes added via command line?
Consider the case where there are two network interfaces connected to the system (Ethernet and WiFi). Both will add 0.0.0.0/0 route in the routing table but, one of the interface will have a lower metric (say Ethernet gets the lower metric).…