Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid GDI DC exhaustion from calling DPI #301

Open
eugenesvk opened this issue May 16, 2024 · 0 comments · May be fixed by #302
Open

Avoid GDI DC exhaustion from calling DPI #301

eugenesvk opened this issue May 16, 2024 · 0 comments · May be fixed by #302

Comments

@eugenesvk
Copy link

eugenesvk commented May 16, 2024

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

@eugenesvk eugenesvk linked a pull request May 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant