2,497 questions with Windows API - Win32 tags

Sort by: Updated
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,497 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,610 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
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,497 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,610 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 12,151 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,497 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
1 answer One of the answers was accepted by the question author.

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…

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,497 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,610 questions
asked 2024-05-30T01:03:33.4266667+00:00
RL Chen 230 Reputation points
edited a comment 2024-05-30T09:46:02.8466667+00:00
Jeanine Zhang-MSFT 9,431 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

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

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,497 questions
asked 2024-05-29T06:22:42.56+00:00
Rohan Pande 375 Reputation points
commented 2024-05-30T04:22:46.9666667+00:00
Rohan Pande 375 Reputation points
0 answers

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…

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,497 questions
asked 2024-04-23T13:05:40.3633333+00:00
Lukas 0 Reputation points
commented 2024-05-28T14:58:20.6466667+00:00
Bikram Sandhu 5 Reputation points
1 answer

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

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,868 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,497 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,643 questions
asked 2024-05-21T03:56:04.6666667+00:00
Mansour_Dalir 1,676 Reputation points
commented 2024-05-27T03:36:02.4133333+00:00
Jiachen Li-MSFT 28,076 Reputation points Microsoft Vendor
0 answers

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…

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,497 questions
asked 2024-05-26T12:02:23.1966667+00:00
Giresharu Fan 0 Reputation points
edited a comment 2024-05-27T02:09:40.8433333+00:00
Xiaopo Yang - MSFT 12,151 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

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…

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,706 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,497 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,571 questions
asked 2024-05-13T21:28:00.4833333+00:00
MERUN KUMAR MAITY 531 Reputation points
accepted 2024-05-25T14:34:14.33+00:00
MERUN KUMAR MAITY 531 Reputation points
3 answers One of the answers was accepted by the question author.

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

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,497 questions
asked 2024-05-21T11:57:06.57+00:00
Shyam Butani 160 Reputation points
accepted 2024-05-24T04:54:40.8533333+00:00
Shyam Butani 160 Reputation points
0 answers

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

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,059 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,497 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,780 questions
asked 2024-05-23T01:32:36.65+00:00
Snshadow 0 Reputation points
commented 2024-05-24T02:50:36.5033333+00:00
Jeanine Zhang-MSFT 9,431 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

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…

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,497 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,610 questions
asked 2022-11-04T16:19:47.753+00:00
Merlin Avery 21 Reputation points
accepted 2024-05-23T02:06:56.3033333+00:00
Merlin Avery 21 Reputation points
1 answer

WinRT MIDI API returns invalid MIDI port names

The WinRT MIDI api in latest Windows 10 returns the name "MIDI" for some devices, which have a different name with the Win32 MIDI API. For example the RME HDSPe AIO has a port name "AIO Midi" in Win32 API but just "MIDI"…

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,497 questions
asked 2022-06-03T00:18:12.957+00:00
Joss Gray 1 Reputation point
answered 2024-05-22T16:27:44.3166667+00:00
Trienco 0 Reputation points
3 answers

CreateDCW is crashing for Printer on worker thread

Hi, I want to print something using printer. For that I need to get the HDC of the printer like below: HDC hdc = CreateDCW (NULL, L"Printer Name", NULL, NULL); This is crashing with below error: Exception thrown at 0x00007FFAE3B85B0C…

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,497 questions
asked 2024-05-15T07:18:16.3466667+00:00
Shyam Butani 160 Reputation points
answered 2024-05-22T06:28:38.9266667+00:00
Shyam Butani 160 Reputation points
1 answer

Obtaining old SDK's and DDK's for the 1990's

I'm reverse engineering some 1990's software that the source has been lost and it was built with MSVC 4.2 (or a variant). I'm looking for any SDK's of that era to help. At present I need the header files etc. associated with MSAA, IAccessible (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,497 questions
asked 2024-05-17T12:00:20.9666667+00:00
Allan W 0 Reputation points
edited the question 2024-05-22T01:56:05.7966667+00:00
Jeanine Zhang-MSFT 9,431 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

Receiving WM_SETTINGCHANGE instead of WM_THEMECHANGED message on theme change Win32 app

I'm running Win32 app on Windows 11. I want to capture theme-change event, but I'm receiving WM_SETTINGCHANGE instead of WM_THEMECHANGED message when system theme is changed (from settings). Find below sample code snippet to get an idea how I'm…

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,497 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,780 questions
asked 2024-05-21T05:26:32.4733333+00:00
Shyam Butani 160 Reputation points
accepted 2024-05-21T10:48:05.5+00:00
Shyam Butani 160 Reputation points
1 answer

Callback for monitoring the creating of files/folder and the changes in the files in Cloud Files API

In Cloud Files API, The platforms invokes the respective callback function for the callback types. there is a callback type for everything reading, moving, deleting, renaming, list fetching but i am not able to find the callbacks for monitoring 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,497 questions
asked 2024-05-15T13:54:18.32+00:00
Vembu Test 0 Reputation points
edited an answer 2024-05-21T09:26:22.7533333+00:00
Xiaopo Yang - MSFT 12,151 Reputation points Microsoft Vendor
5 answers

NVMe Sanitize call returns unexpected error 0x13D

Hi, I'm trying to send NVME Sanitize/BlockErase command to NVMe disk which supports that. This shall be available on regular Win11 OS and I'm running 10.0.22000.1098 (10.0.22000.1042 StorNvm driver). I'm receiving absurd last error after…

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,497 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,610 questions
Windows Hardware Performance
Windows Hardware Performance
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.Hardware Performance: Delivering / providing hardware or hardware systems or adjusting / adapting hardware or hardware systems.
1,570 questions
asked 2022-11-03T14:24:56.677+00:00
DawidW-5205 11 Reputation points
commented 2024-05-21T07:05:13.5+00:00
Winson.Loh 0 Reputation points
0 answers

Audio from WASAPI Capture client is choppy with Express scribe transcription application

I'm working on an application that records audio from the device using the WASAPI capture client.This application records audio and stores raw data in PCM format. My application accurately records every audio that I play in the media player or from any…

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,997 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,497 questions
asked 2024-05-17T10:01:48.4733333+00:00
Preethi Ravi 60 Reputation points
commented 2024-05-21T05:34:43.4733333+00:00
Preethi Ravi 60 Reputation points
1 answer

Calling Windows WebAuthn API in Custom Credential Providers

I've made a simple console application that calls Windows WebAuthn API's WebAuthNAuthenticatorGetAssertion() which will display CredentialUIBroker.exe to authenticate with an external FIDO2 security key. I'm trying to integrate that application with my…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,059 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,497 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,610 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,818 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,780 questions
asked 2023-07-04T08:00:36.2933333+00:00
Steven Chu 15 Reputation points
commented 2024-05-21T02:49:03.56+00:00
Xiaopo Yang - MSFT 12,151 Reputation points Microsoft Vendor