+[TC8.50b2] BG copy processed MB flickering

Bug reports will be moved here when the described bug has been fixed

Moderators: Hacker, petermad, Stefan2, white

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately it's not possible to improve it, because this is a Windows dialog (created via resource editor), not a Delphi dialog where I could draw with double buffering. This is necessary because Delphi dialogs aren't thead-safe.
Author of Total Commander
https://www.ghisler.com
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

There is an extended windows style, introduced in Windows XP SP1 - WS_EX_COMPOSITED:

http://msdn.microsoft.com/en-us/library/windows/desktop/ff700543.aspx
http://msdn.microsoft.com/en-us/library/ms632680.aspx

Calling this during dialog initialization should help:

Code: Select all

const
  WS_EX_COMPOSITED = $02000000;

WM_INITDIALOG:
  SetWindowLong(Handle,GWL_EXSTYLE,GetWindowLong(Handle,GWL_EXSTYLE) or WS_EX_COMPOSITED);
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks, that seems to be helping indeed!
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Can you try it, please? I have added WS_EX_COMPOSITED to the background dialog now.
Author of Total Commander
https://www.ghisler.com
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Post by *gdpr deleted 6 »

I did a quick try of TC8.5b5 32-bit in a virtual machine (again :) ) running Windows 7. The theme is the classic XP Windows theme (no DWM double-buffering).

As far as i can tell, the flickering is gone.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Great, thanks for trying it!
Author of Total Commander
https://www.ghisler.com
Post Reply