Is LVS_EX_DOUBLEBUFFER correct not duplicating the buffer when working on a remote session?

It is intended to use double buffering at startup locally, but not to use double buffering when the window is in a remote session, if you want the best performance for each mode.

The ListView control has an extended LVS_EX_DOUBLEBUFFER style that automatically doubles the buffering of ListView content.

Do I need to register to notify me of changes between local and remote sessions and update this flag accordingly? Or does ListView do this automatically?

+4
source share
1 answer

ListView does not automatically configure itself to use remote or local. It takes into account the meaning of the advanced style flags that you set when creating the control; if you set LVS_EX_DOUBLEBUFFER , then the display will be buffered twice, and if not, this will not happen. I am sure that Raymond Chen would agree that any other behavior would be a mistake.

You can change the state of the flag at any time using LVM_SETEXTENDEDLISTVIEWSTYLE :

 SendMessage(hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_DOUBLEBUFFER, isRemote ? 0 : LVS_EX_DOUBLEBUFFER); 

The following article after you contacted shows how to receive notifications when the display changes between local and remote: http://blogs.msdn.com/b/oldnewthing/archive/2006/01/04/509194.aspx

+5
source

Source: https://habr.com/ru/post/1334121/


All Articles