Patch - Adding WS_EX_LAYOUTRTL support to SendPaintMessage
Original Reporter info from Mantis: engkin @engkin
-
Reporter name:
Original Reporter info from Mantis: engkin @engkin
- Reporter name:
Description:
This bug is related to Win32 widgetset. Windows that have WS_EX_LAYOUTRTL flag do not get painted correctly when double buffering is enabled or when using themes.
I came across this problem while trying to find a fix for TProgressBar.Orientation problems in bug #20966 (closed)
The attached patch is one possible solution that adds corrections to SendPaintMessage procedure in lcl\interfaces\win32\win32callback.inc
Steps to reproduce:
Run the attached application. By default the application has themes enabled. Enable WS_EX_LAYOUTRTL check box and change the progress bar positions using the track bar. You'll see that the LCL based progress bar does not get painted or shows random images unlike the progress bar that was created directly using Windows CreateWindowEx.
Also, if you disable themes in the app and recompile. Check both check boxes, WS_EX_LAYOUTRTL and Double Buffer, and try again.
Additional information:
Corrections made are based on my understanding to http://msdn.microsoft.com/en-us/goglobal/bb688119
ChrisF had noticed this problem first as evident in this post:
http://forum.lazarus.freepascal.org/index.php/topic,22290.msg131656.html#msg131656