[Patch] Improved CreateBrushIndirect workaround
Original Reporter info from Mantis: and
-
Reporter name: Andrew G. Khodotov
Original Reporter info from Mantis: and
- Reporter name: Andrew G. Khodotov
Description:
CreateBrushIndirect doesn't exist under Windows CE (http://wiki.freepascal.org/Windows_CE_Development_Notes#Brushes), and TWinCEWidgetSet.CreateBrushIndirect uses workaround: call one of three other functions depend on brush style (BS_NULL, or BS_DIBPATTERNPT, or BS_SOLID in other cases).
But function CreatePatternBrush from lcl\include\winapi.inc try to create brush with style BS_PATTERN. In the train of this we can see solid (black?) brush.
Additional information:
Attached patch append creation of hBitmap (not DIB) patterned brush. In my mind it's solve http://bugs.freepascal.org/view.php?id=13483, http://bugs.freepascal.org/view.php?id=13022, http://bugs.freepascal.org/view.php?id=19110, http://bugs.freepascal.org/view.php?id=15068, http://bugs.freepascal.org/view.php?id=21998 and maybe some else issues about
blackness on the flat tool- and speedbuttons.
And I also replase chain of "if-else-if..." to single "case" clause: I think it's more readable and neat.
Mantis conversion info:
- Mantis ID: 26748
- OS: Windows Mobile
- OS Build: 6.5 Professional
- Platform: arm-wince
- Version: 1.2.4
- Fixed in revision: 46732 (#26979ca9)
- Monitored by: » and (Andrew G. Khodotov)