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

don't call setscrollinfo with an invalid range and convert a dib to a… #1291

Merged
merged 2 commits into from
Apr 17, 2023

Conversation

cracyc
Copy link
Contributor

@cracyc cracyc commented Apr 14, 2023

… bitmap before setting it to the clipboard if type is cf_bitmap

The program in #1271 sets a bitmap to the clipboard but we, to fix other issues, will sometimes create a dib instead of a ddb. The clipboard won't accept a dib section for cf_bitmap but cf_dib must be a bmp formatted dib not a dib section so just convert it first (windows for some reason won't do it but actually does convert it later if the clipboard reader requests it). Also, the program calls SetScrollRange(0,0) for each scrollbar to make sure they are disabled but during the second call windows 7+ will set the first to 0,100 anyway so just skip calling setscrollrange if the range is null and there is no existing scrollbar (win7 ntvdm has some other workaround for this but I couldn't find it, winxp doesn't have this program at all).

… bitmap before setting it to the clipboard if type is cf_bitmap
@otya128 otya128 merged commit 4a671f0 into otya128:master Apr 17, 2023
@cracyc cracyc deleted the firstvue branch April 17, 2023 14:36
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 this pull request may close these issues.

2 participants