Re: comdlg32-colordlg fix bgcolor
"Ivan Sinitsin" <ivan(a)etersoft.ru> wrote:
The patch corrects background color of a dialogue window " Choose color " at copying a triangular marker, the user colors and the predetermined colors. Earlier the background about these elements was more dark than the basic background of a window.
+ SetClassLongPtrW( hwnd, GCLP_HBRBACKGROUND, (LONG_PTR) GetSysColorBrush(COLOR_BTNFACE));
This fix is not correct, think for instance about different color themes. Probably CC_PaintTriangle needs to specify the background color of a triangle explicitly. -- Dmitry.
В сообщении от 1 февраля 2007 07:00 Dmitry Timoshkov написал(a):
"Ivan Sinitsin" <ivan(a)etersoft.ru> wrote:
The patch corrects background color of a dialogue window " Choose color " at copying a triangular marker, the user colors and the predetermined colors. Earlier the background about these elements was more dark than the basic background of a window.
+ SetClassLongPtrW( hwnd, GCLP_HBRBACKGROUND, (LONG_PTR) GetSysColorBrush(COLOR_BTNFACE));
This fix is not correct, think for instance about different color themes. Probably CC_PaintTriangle needs to specify the background color of a triangle explicitly.
This line obviously sets color (considering the current scheme), it transfers as a background current system color of the scheme for display of a background of elements of management. Has checked up, at change of color schemes - dialogue is displayed correctly.
"Ivan Sinitsin" <ivan(a)etersoft.ru> wrote:
This line obviously sets color (considering the current scheme), it transfers as a background current system color of the scheme for display of a background of elements of management. Has checked up, at change of color schemes - dialogue is displayed correctly.
My concern is why do you change GCLP_HBRBACKGROUND (a system setting) at all? Should the painting code be changed instead to use explicit background color in CC_PaintTriangle? -- Dmitry.
participants (2)
-
Dmitry Timoshkov -
Ivan Sinitsin