2,652 questions with Windows API - Win32 tags

Sort by: Updated
1 answer One of the answers was accepted by the question author.

how to create ID2D1Bitmap using direct2d?

how to load bitmap there is png file and how to create ID2D1Bitmap?

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,652 questions
asked 2024-11-03T15:21:44.5466667+00:00
mc 4,616 Reputation points
commented 2024-11-08T07:43:08.2366667+00:00
mc 4,616 Reputation points
0 answers

Exception Handling in Windows

Windows provides the following exception handling frameworks: Structured Exception Handling (SEH) Vectored Exception Handling (VEH) SEH is just the Windows's version of the C++ try-catch, and documentation suggests using the C++ try-catch blocks. I…

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,652 questions
asked 2024-10-25T07:40:37.14+00:00
CSK 1 Reputation point
commented 2024-11-08T06:01:54.98+00:00
CSK 1 Reputation point
0 answers

why some language will change when remove some code?

in some contries language like Arab the text will change its shape when remove some of them. مرحبا I just remove last one مرحب the first will change too I remove again. مرح you can see it totally changed. حبا to ح what I want to do is to create each…

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,652 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,761 questions
asked 2024-11-08T02:58:22.0466667+00:00
mc 4,616 Reputation points
commented 2024-11-08T04:20:17.4533333+00:00
mc 4,616 Reputation points
0 answers

The behavior of the SetWindowDisplayAffinity API differs depending on the Windows 10 build version.

The behavior of the SetWindowDisplayAffinity API differs depending on the Windows 10 build version. API: SetWindowDisplayAffinity(hwnd, WDA_MONITOR); Windows 10 1909 (18363.418): Works correctly; when my dialog is captured, it turns black. Windows 10…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,716 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,652 questions
asked 2024-11-07T04:34:36.78+00:00
영준 최 0 Reputation points
commented 2024-11-07T08:05:02.7233333+00:00
Jeanine Zhang-MSFT 9,786 Reputation points Microsoft Vendor
2 answers

Is user32.dll has any dependency?

I want to use HDC to draw text in android. So can I copy user32.dll to android and then use HDC ? to get bitmap with some text? I will specify font and font-size

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,652 questions
asked 2024-11-07T03:17:11.1033333+00:00
mc 4,616 Reputation points
answered 2024-11-07T06:36:12.5+00:00
Olaf Helper 45,101 Reputation points
0 answers

Win32 HDC issue

I have a problem with drawing HDC outside WM_PAINT message, I draw in function with while(true) loop void quadcycle() { while(true) { hdc = GetDC(hwnd); RECT rc = {50,50,150,150}; FillRect(hdc, &rc,…

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,652 questions
asked 2024-11-06T21:47:39.6033333+00:00
someone 20 Reputation points
commented 2024-11-06T23:41:38.19+00:00
Darran Rowe 1,041 Reputation points
0 answers

DXGI_ERROR_ACCESS_DENIED when trying to draw a triangle with DirectX 12

So, I'm currently working on drawing a triangle with DirectX 12 and making some helper functions for myself, but CreateCommitedResource keeps failing with DXGI_ERROR_DEVICE_REMOVED and the removal reason being DXGI_ERROR_ACCESS_DENIED. I've been…

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,652 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,761 questions
asked 2024-10-02T23:56:28.9766667+00:00
CakeDev 70 Reputation points
commented 2024-11-06T07:09:02.53+00:00
Roy Li - MSFT 33,371 Reputation points Microsoft Vendor
0 answers

'SysListView32' Bug with multiple items selection: still not fixed in Windows 11 23H2

When I use our own 32 bit application, the mouse cursor still jumps to a corner when I do the lasso selection in a listview (click and drag a rectangle to select multiple listview items). From what I've found in the internet, the program might use a…

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,652 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,761 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
9,893 questions
asked 2024-10-16T14:45:32.1733333+00:00
HenningD 0 Reputation points
commented 2024-11-06T07:05:05.0066667+00:00
Roy Li - MSFT 33,371 Reputation points Microsoft Vendor
0 answers

Decryption failure error with crypt32.dll, CertGetSubjectCertificateFromStore API

We have an application which transfer EDI documents using AS2 protocol where when our business partner and send data to us, we can’t decrypt it. We are reading the certificate from windows certificate store using CertGetSubjectCertificateFromStore api…

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,652 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,761 questions
asked 2024-10-25T09:51:58.47+00:00
Mehul Donga 0 Reputation points
commented 2024-11-06T07:03:20.35+00:00
Roy Li - MSFT 33,371 Reputation points Microsoft Vendor
0 answers

Why GetPerTcpConnectionEStats always return strange value.

I have following code to read TCP congestion stats: Tried a whole day, the read out path_rod is always strange, like: What should I try next?

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,652 questions
asked 2024-10-18T14:01:09.1966667+00:00
xing-9122 0 Reputation points
edited a comment 2024-11-06T03:37:33.14+00:00
xing-9122 0 Reputation points
1 answer One of the answers was accepted by the question author.

How to use function `CreateIconIndirect` with 32 bit bitmaps?

Most icon related documentation is still written with the assumption that the user will want to create a black and white icon, even though we are in the year 2024. A 32 bit bitmap has both the color information and the transparency mask in the same…

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,496 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,652 questions
asked 2024-11-03T20:53:08.11+00:00
László Szerémi 35 Reputation points
commented 2024-11-05T07:25:50.66+00:00
Castorix31 85,881 Reputation points
1 answer

How can I mark my structure as `com_class` in Rust?

Hello, I am implementing a COM object in DLL in Rust. Every single tutorial I found (including ChatGPT and Github Copilot) describes that I need to use #[com_class] macro with my CLSID over my…

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,652 questions
asked 2024-11-02T03:50:13.6333333+00:00
Piotr Kosek 0 Reputation points
commented 2024-11-04T01:19:20.3833333+00:00
Jeanine Zhang-MSFT 9,786 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

CoreWebView2.NavigateToString(String) method fails to load an HTML page

I am using an instance of WebView2 class to display some HTML content in a UI panel for a VS 2022 extension. I can retrieve the HTML content that I want to display in the WebView2 control as a string, and then I am trying to use…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,193 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.
794 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,652 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,011 questions
asked 2024-10-31T17:08:20.23+00:00
AdiGeo 20 Reputation points
edited the question 2024-11-04T01:02:02.5933333+00:00
Roy Li - MSFT 33,371 Reputation points Microsoft Vendor
0 answers

How to handle touch device mapping in multi-monitor setups using Windows API?

When the Windows settings are adjusted to use only the external monitor, my application—designed for hardware diagnostics and reliant on the Windows API—still allows the touchscreen module to be activated and tested. This is problematic because 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,652 questions
asked 2024-10-30T17:17:27.23+00:00
Julio Silva20 5 Reputation points
commented 2024-11-01T21:58:19.1433333+00:00
Darran Rowe 1,041 Reputation points
1 answer

Win32 Console Input: How to differentiate between 0xE0 as a Start-Of-Sequence and 0xE0 as the 1st byte of a UTF-8 sequence/as a codepage character?

I use _getch() for reading input character by character, but there seems to be no way to tell whether the next character still belongs to the last read character or not. It seems that there is no way to tell if a 0xE0 is the 1st of two bytes in a…

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,652 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,761 questions
asked 2024-10-28T21:25:39.0133333+00:00
RobinLe 0 Reputation points
answered 2024-10-31T15:23:56.9033333+00:00
Darran Rowe 1,041 Reputation points
1 answer

How to get policy value after set?

Hi, Is there a way to check if the state has been assigned? I tried this but the return value of v=11 DWMNCRENDERINGPOLICY v; auto k = DwmGetWindowAttribute(hwnd, DWMWA_NCRENDERING_POLICY, &v, 4); <- v return 11. BOOL v; auto k =…

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,652 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,761 questions
asked 2024-10-24T08:01:21.67+00:00
D.D.K-2637 966 Reputation points
commented 2024-10-30T12:06:48.6933333+00:00
D.D.K-2637 966 Reputation points
1 answer

How to make XAudio2 throw a Device Lost flag/error?

Hi, I was wondering how I can produce a Device Lost message for XAudio2. I tried using the dxcaps -forcetdr command in the Developer Command Prompt window for Visual Studio, but it did not work. I am using C++ and programming for Windows 10. Derek

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,652 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,761 questions
asked 2024-10-01T02:15:50.39+00:00
Derek Todd 0 Reputation points
commented 2024-10-29T06:47:38.32+00:00
Roy Li - MSFT 33,371 Reputation points Microsoft Vendor
0 answers

SetLayeredWindowAttributes() is no work

this winapi <SetLayeredWindowAttributes()> in d3d12 is no work , but it in d3d9-11 is work , i want to use in d3d12 , why dose this problem arise ? what should i do ?

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,652 questions
asked 2024-10-15T18:09:44.7633333+00:00
志鸿 吴 0 Reputation points
commented 2024-10-28T15:38:24.9833333+00:00
Darran Rowe 1,041 Reputation points
0 answers

how to read txt file which has char or unicode ?

I can not use std::fstream right? If I set locale I can not read normal char If I do not set it I can not read unicode bytes.

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,652 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,761 questions
asked 2024-10-25T14:11:12.06+00:00
mc 4,616 Reputation points
commented 2024-10-26T10:51:23.86+00:00
RLWA32 45,701 Reputation points
1 answer One of the answers was accepted by the question author.

the bitmap was blank which create from duplication?

I create bitmap from desktop duplication but it is blank of black. hr = dxgiOutputDuplication->AcquireNextFrame(500, &frame_info1, &resource); ID3D11Texture2D* texture1 = NULL; hr = resource->QueryInterface(__uuidof(ID3D11Texture2D),…

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,652 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,761 questions
asked 2024-10-24T11:20:12.8666667+00:00
mc 4,616 Reputation points
commented 2024-10-26T01:50:11.1166667+00:00
mc 4,616 Reputation points