L
LaurieSt
Guest
Hi there,
Regarding the classic example which was pasted into a new VS 2019 Windows Desktop Application C++ project in Windows 1909, the form showed without any bitmap or scrollbars. Is extra code required for that?
Is it possible to apply double buffering in that example to operate in conjunction with ScrollWindowEx? The original idea was to move the co-ordinates of hdcWin in the WM_PAINT section:
(Pseudo code)
hDC = BeginPaint hwnd
hdcMem = CreateCompatibleDC: hDC
hBMMem = CreateCompatibleBitmap
In this example there is
HBITMAP oldBmp = (HBITMAP)SelectObject( memDC, bmp );
Instead of moving the bitmap of the hwnd to the edge of the virtual screen, for example, it is instead, saved to oldBmp
Not sure if all the drawing code in that example is going to help here, as we are only painting.
In another scenario, scrolling a bitmap with additional controls on the form, a drawing procedure should not be required for those controls in WM_PAINT either. Correct?
There's a some other SO examples here, here and here that touch on the issue, but they only render a somewhat incomplete picture in my rather infertile gallery of conceptualizations.
Thanks for any help!
A natural, B flat, C sharp, D compile
Continue reading...
Regarding the classic example which was pasted into a new VS 2019 Windows Desktop Application C++ project in Windows 1909, the form showed without any bitmap or scrollbars. Is extra code required for that?
Is it possible to apply double buffering in that example to operate in conjunction with ScrollWindowEx? The original idea was to move the co-ordinates of hdcWin in the WM_PAINT section:
(Pseudo code)
hDC = BeginPaint hwnd
hdcMem = CreateCompatibleDC: hDC
hBMMem = CreateCompatibleBitmap
In this example there is
HBITMAP oldBmp = (HBITMAP)SelectObject( memDC, bmp );
Instead of moving the bitmap of the hwnd to the edge of the virtual screen, for example, it is instead, saved to oldBmp
Not sure if all the drawing code in that example is going to help here, as we are only painting.
In another scenario, scrolling a bitmap with additional controls on the form, a drawing procedure should not be required for those controls in WM_PAINT either. Correct?
There's a some other SO examples here, here and here that touch on the issue, but they only render a somewhat incomplete picture in my rather infertile gallery of conceptualizations.
Thanks for any help!
A natural, B flat, C sharp, D compile
Continue reading...