Skip to content

Avoid GDI DC exhaustion from calling DPI #301

@eugenesvk

Description

@eugenesvk

I'd like to show a tooltip-like window near a mouse pointer, for I poll for its position and on each call check dpi (in case the mouse moves to a different monitor) to update the size of the tooltip accordingly if dpi changes

However, I've noticed that this generates a lot of GDI DC handles

Is it simply missing an extra releasedc call after calculating DPI?
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-releasedc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions