don't call setscrollinfo with an invalid range and convert a dib to a… #1291
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
… 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).