microsoft / microsoft/win32metadata

Add a way to convert from `HGDIOBJ` to `HBRUSH`

Open
#1,863 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
1.5k
Forks
149
Avg merge
5d 16h
Merged PRs (30d)
4

Description

### Suggestion

`GetStockObject` is widely used in params that takes an `HBRUSH`. A better helper should be added to avoid things like `HBRUSH(GetStockObject(WHITE_BRUSH).0)`.

Contributor guide

Open the contributing guide

Research direction

Start by locating the metadata or helper definitions for HGDIOBJ, HBRUSH, and GetStockObject. Add a conversion path that avoids the explicit HBRUSH(GetStockObject(WHITE_BRUSH).0) form, then verify that Win32 API metadata generation handles the resulting helper correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.