ppescher / resizablelib

A set of MFC classes to easily make resizable windows
Other
54 stars 28 forks source link

Add Option to disable CResizableLayout::HandleNcCalcSize (help elimin… #20

Open 0ric1 opened 5 years ago

0ric1 commented 5 years ago

…ate flickering), because of e.g. VISTA redraw problems.

ppescher commented 5 years ago

Flickering is not caused by the graphics card, but they way the Windows OS redraws the client area.

HandleNcCalcSize() can avoid flickering, or at least reduce it considerably, if you resize the window by dragging the top or left borders, because by default the client area is copied to the top-left corner and so you would get flickering at the opposite side, even if it does not move in that case.

That fix was useful only for WinXP and Win2000, not sure about Win7 with "old-style" window theme. In modern Windows OSes the window drawing appears to be double-buffered, but I'm not sure exactly which versions and what system/application settings to check at runtime.

0ric1 commented 5 years ago

I added a DISABLE_ELIMINATE_FLICKERING to be able to disable it, because we had redraw problems on Vista when it was enabled - it look good without the HandleNcCalcSize code even on Windows 10.