2,463 questions with Windows API - Win32 tags

Sort by: Updated
0 answers

Why is my panning in Direct 2D drifting at the edge of the window?

I'm going through a windows tutorial for Direct 2D drawing a small picture on a render target and I decided to try to add pan and zoom capabilities. All is working mostly fine but I'm having an issue with the pan. My is supposed to move in sync with…

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,463 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,580 questions
asked 2024-06-07T01:27:46.7733333+00:00
Forrest Crawford 0 Reputation points
commented 2024-06-07T10:58:38.26+00:00
Forrest Crawford 0 Reputation points
1 answer

How to get the text from the label by the handle with specific coordinates on any part of the desktop screen

I want to extract the text inside the label by giving certain coordinates from the screen, if the type of the coordinates is from the label, then extract the part of the obtained part.

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,861 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,463 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,615 questions
asked 2024-06-06T07:48:09.8966667+00:00
Mansour_Dalir 1,676 Reputation points
commented 2024-06-07T08:13:40.7266667+00:00
Castorix31 82,231 Reputation points
0 answers

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…

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,463 questions
asked 2024-05-28T07:01:17.8166667+00:00
Dev Stability 7 Reputation points
commented 2024-06-07T07:22:21.9+00:00
Jeanine Zhang-MSFT 9,346 Reputation points Microsoft Vendor
3 answers

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…

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,463 questions
asked 2024-05-22T23:27:05.93+00:00
Wong, Irene 0 Reputation points
commented 2024-06-07T06:55:26.2966667+00:00
Tong Xu - MSFT 2,116 Reputation points Microsoft Vendor
0 answers

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…

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,463 questions
asked 2024-05-28T14:41:40.8166667+00:00
Daman 0 Reputation points
edited the question 2024-06-07T06:20:23.63+00:00
Tianyu Sun-MSFT 28,341 Reputation points Microsoft Vendor
1 answer

How to programatically get NPU utilization using C/C++/C#

如果一台PC有NPU,那么在Windows 11任务管理器中,“性能”页面就会显示NPU的信息(包括使用率),一般来说,这个页面显示的信息从“性能计数器(PDH)”中获取,但是我并没有找到对应的计数器。有谁知道这个NPU使用率从哪儿获取吗? If a PC has an NPU, then in the Windows 11 Task Manager, the "Performance" page will display the information of the NPU…

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,463 questions
Windows Performance Toolkit
Windows Performance Toolkit
A collection of Microsoft performance monitoring tools that produce in-depth performance profiles of Windows operating systems and applications.
92 questions
asked 2024-06-06T08:39:18.8033333+00:00
comor 0 Reputation points
answered 2024-06-07T02:32:45.0933333+00:00
Tong Xu - MSFT 2,116 Reputation points Microsoft Vendor
2 answers

EVENTLOGRECORD Y2038 issue

Dear Microsoft colleague, The question is about _EVENTLOGRECORD structure. typedef struct _EVENTLOGRECORD { DWORD Length; DWORD Reserved; DWORD RecordNumber; DWORD TimeGenerated; DWORD TimeWritten; DWORD EventID; WORD EventType; WORD NumStrings; …

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,463 questions
asked 2024-06-05T07:20:22.4466667+00:00
answered 2024-06-06T03:06:53.8933333+00:00
Xiaopo Yang - MSFT 11,741 Reputation points Microsoft Vendor
0 answers

NotifyIpInterfaceChange function (netioapi.h) does not notify on manual DNS changes

I work on the c-ares open source asynchronous DNS library (https://c-ares.org) and we have recently added automatic configuration reloading when we detect a network configuration change has occurred. We get notifications properly when network…

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.
4,902 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,463 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,580 questions
asked 2024-06-05T16:21:55.43+00:00
Brad House 0 Reputation points
edited a comment 2024-06-06T02:38:50.7066667+00:00
Xiaopo Yang - MSFT 11,741 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

There are two invisible windows under my process with titles "MSCTFIME UI" and "Default IME"

Hi, I am working on win32 app and WinUI3 app in CPP. I want to find out all the available windows of my application. I am using EnumWindows to enumerate over all the windows and then filter it using process-ID in EnumWindowsProc. But I found that there…

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.
4,902 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,463 questions
asked 2024-06-04T12:51:04.28+00:00
Shyam Butani 135 Reputation points
commented 2024-06-05T10:02:43.37+00:00
Shyam Butani 135 Reputation points
1 answer One of the answers was accepted by the question author.

How to get the GetDpiForWindow function signature correctly using LoadLibraryA and GetProcAddress ?

I am trying to use Rust write a cross-platform screenshot program to make it work on Windows 7 and above (such as Windows 7 and 10). By consulting, the scaling ratio of each window in the system above Windows 10 is independent, which means that the use…

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,463 questions
asked 2024-06-05T06:12:59.9666667+00:00
Qingyao Lin 20 Reputation points
accepted 2024-06-05T09:04:00.03+00:00
Qingyao Lin 20 Reputation points
1 answer

The QueryVirtualMemoryInformation function fails in 32-bit mode because the WIN32_MEMORY_REGION_INFORMATION structure is defined incorrectly.

For the record, I have Windows 11, "Version 10.0.22631 Build 22631". The WIN32_MEMORY_REGION_INFORMATION structure is defined in "memoryapi.h" as the following: typedef struct WIN32_MEMORY_REGION_INFORMATION { PVOID…

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.
4,902 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,463 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,580 questions
asked 2024-06-04T11:29:47.0133333+00:00
RoflCopter4 10 Reputation points
commented 2024-06-05T08:28:25.9233333+00:00
RLWA32 41,696 Reputation points
1 answer

How to detect scale factor in Windows 10 in C++

I am trying to detect the display scale factor in Windows 10 in C++. Below is the code I am using. //Code to detect scale void getDisplayScale(double &h_Scale, double &v_Scale) { //auto activeWindow = GetActiveWindow(); HWND…

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,463 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,580 questions
asked 2022-05-23T06:55:03.21+00:00
Azeem Cv 1 Reputation point
commented 2024-06-05T06:18:53.14+00:00
Xiaopo Yang - MSFT 11,741 Reputation points Microsoft Vendor
1 answer

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…

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.
4,902 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,463 questions
asked 2024-05-24T21:31:24.4833333+00:00
László Szerémi 15 Reputation points
commented 2024-06-03T20:02:37.8033333+00:00
RLWA32 41,696 Reputation points
2 answers One of the answers was accepted by the question author.

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 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,691 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,463 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.
10,450 questions
asked 2022-01-29T15:53:59.047+00:00
Heiko 1,216 Reputation points
commented 2024-06-03T19:50:07.46+00:00
Jannet Puckett 0 Reputation points
0 answers

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…

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,463 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,580 questions
asked 2024-05-03T12:58:05.9266667+00:00
Dada Khalandhar Gooty 0 Reputation points
commented 2024-06-03T11:17:36.65+00:00
Dada Khalandhar Gooty 0 Reputation points
0 answers

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…

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,463 questions
asked 2024-05-31T09:47:15.4033333+00:00
Bill Gora 0 Reputation points
commented 2024-06-03T01:14:39.0966667+00:00
Jeanine Zhang-MSFT 9,346 Reputation points Microsoft Vendor
3 answers

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

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,463 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,580 questions
asked 2022-02-26T01:00:40.19+00:00
DaveF 21 Reputation points
answered 2024-06-03T00:16:13.9233333+00:00
Ruth Haephrati 10 Reputation points
2 answers

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…

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,463 questions
asked 2024-05-21T09:24:04.67+00:00
Ahinoam Tayari Dvir 0 Reputation points
commented 2024-05-31T06:34:43.3466667+00:00
Xiaopo Yang - MSFT 11,741 Reputation points Microsoft Vendor
1 answer

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…

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,463 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,580 questions
asked 2024-05-22T03:54:58.4266667+00:00
Balineni Rohith Sai 0 Reputation points
commented 2024-05-31T06:33:38.1466667+00:00
Xiaopo Yang - MSFT 11,741 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

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…

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,463 questions
asked 2024-05-30T12:30:26.29+00:00
Harshithraj1871 1,516 Reputation points
accepted 2024-05-30T13:23:00.38+00:00
Harshithraj1871 1,516 Reputation points