question

kasmer-2455 avatar image
0 Votes"
kasmer-2455 asked ·

Scrolling glitch with HBITMAP BitBlt c++

It renders the pages when you are looking at that page.

The problem is when I scroll, it glitches.

Commenting out the pDC->FillSolidRect code makes the background glitchness, but still has the flickering when scrolling.

I was told to issue 4 FillSolidRect calls for the border strips only or to erase the border in the off-screen device context, but I don't know how.

May anyone supply examples on how to fix this, as it seems I am double buffering just fine?

EDIT: SAME THING HAPPENS IN THE IMAGE HERE: https://i.stack.imgur.com/OyN3V.jpg https://i.stack.imgur.com/LRc96.png



c++windows-api-general
· 2
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello, @kasmer-2455

There are many reasons for flickering, you can refer to the following article to avoid this problem.

0 Votes 0 ·

Sadly that doesn't help me at all as I am doing what they said.

0 Votes 0 ·

1 Answer

Castorix31 avatar image
0 Votes"
Castorix31 answered ·

Maybe you can see/adapt the MSDN sample to display a bitmap with scrollbars handling
Example of Scrolling a Bitmap
(I tested it in a C++/Win32 app on Windows 10, it works fine)


·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.