2,723 questions with Windows API - Win32 tags

Sort by: Updated
0 answers

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:…

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
asked 2025-02-02T18:55:42.9833333+00:00
ProMiNick 40 Reputation points
commented 2025-02-04T10:15:47.8866667+00:00
ProMiNick 40 Reputation points
1 answer

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…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
12,027 questions
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
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#
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,265 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,636 questions
asked 2025-01-28T15:52:31.3966667+00:00
123244 100 Reputation points
commented 2025-02-04T09:50:01.5433333+00:00
Castorix31 86,611 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
1 answer

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…

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
asked 2025-01-18T06:07:24.2933333+00:00
XiaoYouChR 0 Reputation points
commented 2025-02-04T08:45:41.7333333+00:00
Roy Li - MSFT 33,671 Reputation points Microsoft Vendor
1 answer

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…

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
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
asked 2025-01-24T10:24:43.7566667+00:00
Navaneeth 21 Reputation points
commented 2025-02-04T08:38:27.87+00:00
Roy Li - MSFT 33,671 Reputation points Microsoft Vendor
1 answer

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…

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
asked 2025-01-23T05:41:06.8066667+00:00
Prem Jha 95 Reputation points
edited the question 2025-02-04T08:37:17.7+00:00
Roy Li - MSFT 33,671 Reputation points Microsoft Vendor
0 answers

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…

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
asked 2025-01-15T12:21:37.38+00:00
HFU-8017 0 Reputation points
commented 2025-02-04T08:36:27.8266667+00:00
Roy Li - MSFT 33,671 Reputation points Microsoft Vendor
0 answers

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

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
asked 2025-02-04T02:07:14.77+00:00
Vaibhav Thakare [EXT] 0 Reputation points
commented 2025-02-04T03:14:23.04+00:00
Jeanine Zhang-MSFT 10,526 Reputation points Microsoft Vendor
0 answers

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…

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
asked 2025-01-31T22:57:11.4266667+00:00
Vitor Hugo Gomes 0 Reputation points
commented 2025-02-04T02:23:57.13+00:00
Jeanine Zhang-MSFT 10,526 Reputation points Microsoft Vendor
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.

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?

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
asked 2025-02-03T06:24:25.3666667+00:00
Harshithraj1871 1,576 Reputation points
commented 2025-02-03T10:18:13.59+00:00
RLWA32 46,756 Reputation points
2 answers One of the answers was accepted by the question author.

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…

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
asked 2023-04-06T08:21:28.6233333+00:00
ProMiNick 40 Reputation points
commented 2025-02-02T23:00:25.26+00:00
ProMiNick 40 Reputation points
1 answer

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…

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
asked 2025-02-02T01:29:39.93+00:00
Cristoforo Montanari 0 Reputation points
edited an answer 2025-02-02T11:32:27.74+00:00
Castorix31 86,611 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

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;…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
12,027 questions
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
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,636 questions
asked 2025-01-25T14:19:39.0966667+00:00
Ashish Rana 0 Reputation points
commented 2025-01-31T16:20:22.3933333+00:00
Ashish Rana 0 Reputation points
0 answers

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…

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
asked 2025-01-25T14:19:43.4133333+00:00
Артур Абубакиров 0 Reputation points
commented 2025-01-27T11:47:50.4466667+00:00
Артур Абубакиров 0 Reputation points
0 answers

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…

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
asked 2025-01-09T15:01:37.3+00:00
Marek 0 Reputation points
commented 2025-01-24T06:54:16.56+00:00
Jeanine Zhang-MSFT 10,526 Reputation points Microsoft Vendor
2 answers

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…

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
asked 2025-01-21T12:12:36.48+00:00
Gregory Reed 0 Reputation points
commented 2025-01-22T10:52:50.6533333+00:00
RLWA32 46,756 Reputation points
1 answer One of the answers was accepted by the question author.

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.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,085 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,822 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#
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,265 questions
asked 2025-01-15T12:29:34.7333333+00:00
Vishal2 Bansal 225 Reputation points
accepted 2025-01-22T05:07:30.16+00:00
Vishal2 Bansal 225 Reputation points
0 answers

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).…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
12,027 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
Windows Network
Windows Network
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.Network: A group of devices that communicate either wirelessly or via a physical connection.
812 questions
asked 2024-06-19T09:27:31.26+00:00
Deepan Negi 0 Reputation points
commented 2025-01-21T06:45:02.6833333+00:00
Deepan Negi 0 Reputation points