mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2025-05-08 23:52:27 +08:00
use GetWindowElementPixelEx instead of GetWindowElementPixel or GetWindowElementColor
This commit is contained in:
parent
575ef72246
commit
df2d74fb0a
@ -5175,7 +5175,7 @@ MG_EXPORT DWORD GUIAPI SetWindowElementAttr (HWND hwnd, int we_attr_id,
|
||||
|
||||
/**
|
||||
* \fn gal_pixel GUIAPI GetWindowElementPixelEx (HWND hwnd, \
|
||||
HDC hdc, int we_attr_id)
|
||||
HDC hdc, int we_attr_id)
|
||||
* \brief Get the pixel value of a window element.
|
||||
*
|
||||
* This function gets the pixel value of a window element which is identified
|
||||
@ -7885,18 +7885,23 @@ static inline void GUIAPI ScrollWindow (HWND hWnd, int dx, int dy,
|
||||
NULL, NULL, SW_ERASE | SW_INVALIDATE | SW_SCROLLCHILDREN);
|
||||
}
|
||||
|
||||
/**
|
||||
* \def GetWindowElementColor
|
||||
* \brief Get window element color.
|
||||
*/
|
||||
#if 0
|
||||
/* deprecated. */
|
||||
#define GetWindowElementColor(iItem) \
|
||||
GetWindowElementPixelEx(HWND_NULL, (HDC)-1, iItem)
|
||||
|
||||
/* deprecated. */
|
||||
#define GetWindowElementColorEx(hWnd, iItem) \
|
||||
GetWindowElementPixelEx(hWnd, (HDC)-1, iItem)
|
||||
#endif
|
||||
|
||||
#define GetWindowElementPixel(hWnd, iItem) \
|
||||
GetWindowElementPixelEx(hWnd, (HDC)-1, iItem)
|
||||
/**
|
||||
* \def GetWindowElementPixel
|
||||
* \brief Get window element pixel value.
|
||||
* \sa GetWindowElementPixelEx
|
||||
*/
|
||||
#define GetWindowElementPixel(hWnd, iItem) \
|
||||
GetWindowElementPixelEx(hWnd, HDC_INVALID, iItem)
|
||||
|
||||
/** @} end of window_general_fns */
|
||||
|
||||
|
@ -1616,7 +1616,8 @@ int GBIMEWinProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
case MSG_PAINT:
|
||||
hdc = BeginPaint (hWnd);
|
||||
SetBkColor (hdc, GetWindowElementPixel (hWnd, WE_MAINC_THREED_BODY));
|
||||
SetBkColor (hdc,
|
||||
GetWindowElementPixelEx (hWnd, hdc, WE_MAINC_THREED_BODY));
|
||||
refresh_input_method_area (hWnd, hdc);
|
||||
EndPaint (hWnd, hdc);
|
||||
return 0;
|
||||
@ -1736,7 +1737,7 @@ static void InitIMEWinCreateInfo (PMAINWINCREATE pCreateInfo)
|
||||
pCreateInfo->rx = GetGDCapability (HDC_SCREEN, GDCAP_MAXX);
|
||||
pCreateInfo->by = GetGDCapability (HDC_SCREEN, GDCAP_MAXY) - 40;
|
||||
pCreateInfo->iBkColor =
|
||||
GetWindowElementPixel (HWND_NULL, WE_MAINC_THREED_BODY);
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->dwAddData = 0;
|
||||
pCreateInfo->hHosting = 0;
|
||||
}
|
||||
|
@ -109,7 +109,8 @@ BOOL RegisterBIDISLEditControl (void)
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
WndClass.iBkColor = GetWindowElementPixelEx (HWND_NULL,
|
||||
HDC_SCREEN, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = SLEditCtrlProc;
|
||||
|
||||
@ -214,9 +215,10 @@ static void setup_dc (HWND hWnd, BIDISLEDITDATA *sled, HDC hdc, BOOL bSel)
|
||||
|
||||
if (dwStyle & WS_DISABLED)
|
||||
SetTextColor (hdc,
|
||||
GetWindowElementPixel (hWnd, WE_FGC_DISABLED_ITEM));
|
||||
GetWindowElementPixelEx (hWnd, hdc, WE_FGC_DISABLED_ITEM));
|
||||
else
|
||||
SetTextColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_WINDOW));
|
||||
SetTextColor (hdc,
|
||||
GetWindowElementPixelEx (hWnd, hdc, WE_FGC_WINDOW));
|
||||
|
||||
SetBkColor (hdc, GetWindowBkColor (hWnd));
|
||||
}
|
||||
@ -226,17 +228,17 @@ static void setup_dc (HWND hWnd, BIDISLEDITDATA *sled, HDC hdc, BOOL bSel)
|
||||
|
||||
if (dwStyle & WS_DISABLED)
|
||||
SetTextColor (hdc,
|
||||
GetWindowElementPixel (hWnd, WE_FGC_DISABLED_ITEM));
|
||||
GetWindowElementPixelEx (hWnd, hdc, WE_FGC_DISABLED_ITEM));
|
||||
else
|
||||
SetTextColor (hdc,
|
||||
GetWindowElementPixel (hWnd, WE_FGC_SELECTED_ITEM));
|
||||
GetWindowElementPixelEx (hWnd, hdc, WE_FGC_SELECTED_ITEM));
|
||||
|
||||
if (sled->status & EST_FOCUSED)
|
||||
SetBkColor (hdc,
|
||||
GetWindowElementPixel (hWnd, WE_BGC_SELECTED_ITEM));
|
||||
GetWindowElementPixelEx (hWnd, hdc, WE_BGC_SELECTED_ITEM));
|
||||
else
|
||||
SetBkColor (hdc,
|
||||
GetWindowElementPixel (hWnd, WE_BGC_SELECTED_LOSTFOCUS));
|
||||
GetWindowElementPixelEx (hWnd, hdc, WE_BGC_SELECTED_LOSTFOCUS));
|
||||
}
|
||||
}
|
||||
|
||||
@ -509,7 +511,7 @@ static void slePaint (HWND hWnd, HDC hdc, PBIDISLEDITDATA sled)
|
||||
}
|
||||
|
||||
if (dwStyle & ES_BASELINE) {
|
||||
SetPenColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_WINDOW));
|
||||
SetPenColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_FGC_WINDOW));
|
||||
#ifdef _PHONE_WINDOW_STYLE
|
||||
MoveTo (hdc, sled->leftMargin, sled->rcVis.bottom);
|
||||
LineTo (hdc, sled->rcVis.right, sled->rcVis.bottom);
|
||||
|
@ -671,7 +671,7 @@ BOOL RegisterButtonControl (void)
|
||||
GetWindowElementAttr (HWND_NULL, WE_MAINC_THREED_BODY);
|
||||
#else
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixel (HWND_NULL, WE_MAINC_THREED_BODY);
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_MAINC_THREED_BODY);
|
||||
#endif
|
||||
WndClass.WinProc = ButtonCtrlProc;
|
||||
|
||||
@ -707,8 +707,8 @@ static LRESULT ButtonCtrlProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
|
||||
{
|
||||
case MSG_CREATE:
|
||||
pData = (BUTTONDATA*) calloc (1, sizeof(BUTTONDATA));
|
||||
SetWindowBkColor (hWnd, GetWindowElementPixel (hWnd,
|
||||
WE_MAINC_THREED_BODY));
|
||||
SetWindowBkColor (hWnd, GetWindowElementPixelEx (hWnd,
|
||||
HDC_INVALID, WE_MAINC_THREED_BODY));
|
||||
if (pData == NULL)
|
||||
return -1;
|
||||
|
||||
|
@ -98,7 +98,7 @@ BOOL RegisterComboBoxControl (void)
|
||||
GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = ComboBoxCtrlProc;
|
||||
|
||||
|
@ -100,7 +100,8 @@ static LRESULT ToolTipWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lP
|
||||
text = GetWindowCaption (hWnd);
|
||||
SetBkMode (hdc, BM_TRANSPARENT);
|
||||
|
||||
SetTextColor (hdc, GetWindowElementPixel(hWnd, WE_FGC_TOOLTIP));
|
||||
SetTextColor (hdc,
|
||||
GetWindowElementPixelEx(hWnd, hdc, WE_FGC_TOOLTIP));
|
||||
TabbedTextOut (hdc, iBorder, iBorder, text);
|
||||
|
||||
EndPaint (hWnd, hdc);
|
||||
@ -172,7 +173,8 @@ HWND CreateToolTipWin (HWND hParentWnd, int x, int y, int timeout_ms,
|
||||
CreateInfo.ty = y;
|
||||
CreateInfo.rx = CreateInfo.lx + text_size.cx;
|
||||
CreateInfo.by = CreateInfo.ty + text_size.cy;
|
||||
CreateInfo.iBkColor = GetWindowElementPixel (hParentWnd, WE_BGC_TOOLTIP);
|
||||
CreateInfo.iBkColor =
|
||||
GetWindowElementPixelEx (hParentWnd, HDC_SCREEN, WE_BGC_TOOLTIP);
|
||||
CreateInfo.dwAddData = (DWORD) timeout_ms;
|
||||
CreateInfo.hHosting = hParentWnd;
|
||||
|
||||
@ -229,9 +231,9 @@ void DestroyToolTipWin (HWND hwnd)
|
||||
void GUIAPI DisabledTextOutEx (HDC hdc, HWND hwnd, int x, int y, const char* szText)
|
||||
{
|
||||
SetBkMode (hdc, BM_TRANSPARENT);
|
||||
SetTextColor (hdc, GetWindowElementColorEx (hwnd, WE_DISABLED_ITEM));
|
||||
SetTextColor (hdc, GetWindowElementPixelEx (hwnd, hdc, WE_DISABLED_ITEM));
|
||||
TextOut (hdc, x + 1, y + 1, szText);
|
||||
SetTextColor (hdc, GetWindowElementColorEx (hwnd, WE_SIGNIFICANT_ITEM));
|
||||
SetTextColor (hdc, GetWindowElementPixelEx (hwnd, hdc, WE_SIGNIFICANT_ITEM));
|
||||
TextOut (hdc, x, y, szText);
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,8 @@ BOOL RegisterSLEditControl (void)
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = SLEditCtrlProc;
|
||||
|
||||
@ -138,23 +139,29 @@ static void setup_dc (HWND hWnd, SLEDITDATA *sled, HDC hdc, BOOL bSel)
|
||||
if (!bSel) {
|
||||
SetBkMode (hdc, BM_TRANSPARENT);
|
||||
if (dwStyle & WS_DISABLED)
|
||||
SetTextColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_DISABLED_ITEM));
|
||||
SetTextColor (hdc,
|
||||
GetWindowElementPixelEx (hWnd, hdc, WE_FGC_DISABLED_ITEM));
|
||||
else
|
||||
SetTextColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_WINDOW));
|
||||
SetTextColor (hdc,
|
||||
GetWindowElementPixelEx (hWnd, hdc, WE_FGC_WINDOW));
|
||||
SetBkColor (hdc, GetWindowBkColor (hWnd));
|
||||
}
|
||||
else {
|
||||
SetBkMode (hdc, BM_OPAQUE);
|
||||
|
||||
if (dwStyle & WS_DISABLED)
|
||||
SetTextColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_DISABLED_ITEM));
|
||||
SetTextColor (hdc,
|
||||
GetWindowElementPixelEx (hWnd, hdc, WE_FGC_DISABLED_ITEM));
|
||||
else
|
||||
SetTextColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_SELECTED_ITEM));
|
||||
SetTextColor (hdc,
|
||||
GetWindowElementPixelEx (hWnd, hdc, WE_FGC_SELECTED_ITEM));
|
||||
|
||||
if (sled->status & EST_FOCUSED)
|
||||
SetBkColor (hdc, GetWindowElementPixel (hWnd, WE_BGC_SELECTED_ITEM));
|
||||
SetBkColor (hdc,
|
||||
GetWindowElementPixelEx (hWnd, hdc, WE_BGC_SELECTED_ITEM));
|
||||
else
|
||||
SetBkColor (hdc, GetWindowElementPixel (hWnd, WE_BGC_SELECTED_LOSTFOCUS));
|
||||
SetBkColor (hdc,
|
||||
GetWindowElementPixelEx (hWnd, hdc, WE_BGC_SELECTED_LOSTFOCUS));
|
||||
}
|
||||
}
|
||||
|
||||
@ -358,7 +365,8 @@ static void slePaint (HWND hWnd, HDC hdc, PSLEDITDATA sled)
|
||||
}
|
||||
|
||||
if (dwStyle & ES_BASELINE) {
|
||||
SetPenColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_WINDOW));
|
||||
SetPenColor (hdc,
|
||||
GetWindowElementPixelEx (hWnd, hdc, WE_FGC_WINDOW));
|
||||
#ifdef _PHONE_WINDOW_STYLE
|
||||
MoveTo (hdc, sled->leftMargin, sled->rcVis.bottom);
|
||||
LineTo (hdc, sled->rcVis.right, sled->rcVis.bottom);
|
||||
|
@ -93,7 +93,8 @@ BOOL RegisterListboxControl (void)
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = ListboxCtrlProc;
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
|
@ -91,8 +91,8 @@ BOOL RegisterMenuButtonControl (void)
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL,
|
||||
WE_MAINC_THREED_BODY);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL,
|
||||
WE_MAINC_THREED_BODY);
|
||||
WndClass.iBkColor = GetWindowElementPixelEx (HWND_NULL,
|
||||
HDC_SCREEN, WE_MAINC_THREED_BODY);
|
||||
#endif
|
||||
WndClass.WinProc = MenuButtonCtrlProc;
|
||||
|
||||
|
@ -90,7 +90,8 @@ BOOL RegisterNewToolbarControl (void)
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = NewToolbarCtrlProc;
|
||||
|
||||
@ -376,7 +377,7 @@ static void draw_item_text_vert (HWND hwnd, HDC hdc, PNTBCTRLDATA ntb_data, NTBI
|
||||
|
||||
SetBkMode (hdc, BM_TRANSPARENT);
|
||||
bk_pixel = SetBkColor (hdc, GetWindowBkColor (hwnd));
|
||||
SetTextColor (hdc, GetWindowElementPixel (hwnd, WE_FGC_WINDOW));
|
||||
SetTextColor (hdc, GetWindowElementPixelEx (hwnd, hdc, WE_FGC_WINDOW));
|
||||
DrawText (hdc, item->text, -1, &item->rc_text, format);
|
||||
SetBkColor (hdc, bk_pixel);
|
||||
}
|
||||
@ -702,7 +703,7 @@ static void draw_item_text_horz (HWND hwnd, HDC hdc, PNTBCTRLDATA ntb_data, NTBI
|
||||
|
||||
SetBkMode (hdc, BM_TRANSPARENT);
|
||||
bk_pixel = SetBkColor (hdc, GetWindowBkColor (hwnd));
|
||||
SetTextColor (hdc, GetWindowElementPixel (hwnd, WE_FGC_WINDOW));
|
||||
SetTextColor (hdc, GetWindowElementPixelEx (hwnd, hdc, WE_FGC_WINDOW));
|
||||
DrawText (hdc, item->text, -1, &item->rc_text, format);
|
||||
SetBkColor (hdc, bk_pixel);
|
||||
}
|
||||
|
@ -227,8 +227,8 @@ BOOL RegisterProgressBarControl (void)
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL,
|
||||
WE_MAINC_THREED_BODY);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL,
|
||||
WE_MAINC_THREED_BODY);
|
||||
WndClass.iBkColor = GetWindowElementPixelEx (HWND_NULL,
|
||||
HDC_SCREEN, WE_MAINC_THREED_BODY);
|
||||
#endif
|
||||
WndClass.WinProc = ProgressBarCtrlProc;
|
||||
|
||||
|
@ -96,8 +96,8 @@ BOOL RegisterPropSheetControl (void)
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL,
|
||||
WE_MAINC_THREED_BODY);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL,
|
||||
WE_MAINC_THREED_BODY);
|
||||
WndClass.iBkColor = GetWindowElementPixelEx (HWND_NULL,
|
||||
HDC_SCREEN, WE_MAINC_THREED_BODY);
|
||||
#endif
|
||||
WndClass.WinProc = PropSheetCtrlProc;
|
||||
|
||||
@ -974,8 +974,8 @@ PropSheetCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
case MSG_CREATE: {
|
||||
#ifdef __TARGET_MSTUDIO__
|
||||
SetWindowBkColor(hwnd,
|
||||
GetWindowElementPixel (hwnd, WE_MAINC_THREED_BODY));
|
||||
SetWindowBkColor(hwnd, GetWindowElementPixelEx (hwnd,
|
||||
HDC_INVALID, WE_MAINC_THREED_BODY));
|
||||
#endif
|
||||
|
||||
if (!(propsheet = calloc (1, sizeof (PROPSHEETDATA)))) {
|
||||
|
@ -1258,9 +1258,10 @@ BOOL RegisterScrollBarControl (void)
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (0);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = ScrollBarCtrlProc;
|
||||
|
||||
|
@ -598,9 +598,10 @@ BOOL RegisterScrollViewControl (void)
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (IDC_ARROW);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = ScrollViewCtrlProc;
|
||||
|
||||
|
@ -289,7 +289,8 @@ BOOL RegisterScrollWndControl (void)
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = ScrollWndCtrlProc;
|
||||
|
||||
@ -365,7 +366,8 @@ static BOOL RegisterContainer (void)
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = DefaultContainerProc;
|
||||
|
||||
|
@ -83,12 +83,13 @@ StaticControlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
case MSG_CREATE:
|
||||
#ifdef __TARGET_MSTUDIO__
|
||||
SetWindowBkColor (hwnd,
|
||||
GetWindowElementPixel (hwnd, WE_MAINC_THREED_BODY));
|
||||
GetWindowElementPixelEx (hwnd,
|
||||
HDC_INVALID, WE_MAINC_THREED_BODY));
|
||||
#endif
|
||||
|
||||
pCtrl->dwAddData2 = pCtrl->dwAddData;
|
||||
SetWindowBkColor (hwnd, GetWindowElementPixel (hwnd,
|
||||
WE_MAINC_THREED_BODY));
|
||||
SetWindowBkColor (hwnd, GetWindowElementPixelEx (hwnd,
|
||||
HDC_INVALID, WE_MAINC_THREED_BODY));
|
||||
/* DK[01/11/10]: For bug 4336 */
|
||||
switch (pCtrl->dwStyle & SS_TYPEMASK) {
|
||||
case SS_GRAYRECT:
|
||||
@ -354,8 +355,8 @@ BOOL RegisterStaticControl (void)
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL,
|
||||
WE_MAINC_THREED_BODY);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL,
|
||||
WE_MAINC_THREED_BODY);
|
||||
WndClass.iBkColor = GetWindowElementPixelEx (HWND_NULL,
|
||||
HDC_SCREEN, WE_MAINC_THREED_BODY);
|
||||
#endif
|
||||
WndClass.WinProc = StaticControlProc;
|
||||
|
||||
|
@ -964,7 +964,7 @@ static void tePaint(HWND hWnd, HDC hdc, RECT *rcDraw)
|
||||
h = ptedata->nLineHeight - 1;
|
||||
|
||||
if (GetWindowStyle(hWnd) & ES_BASELINE) {
|
||||
SetPenColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_WINDOW));
|
||||
SetPenColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_FGC_WINDOW));
|
||||
while (h < RECTHP(rc)) {
|
||||
#ifdef _TITLE_SUPPORT
|
||||
indent = (h == ptedata->nLineHeight - 1) ? ptedata->titleIndent : 0;
|
||||
@ -982,21 +982,25 @@ static void setup_dc (HWND hWnd, HDC hdc, BOOL bSel)
|
||||
SetBkColor (hdc, GetWindowBkColor (hWnd));
|
||||
|
||||
SetTextColor (hdc,
|
||||
GetWindowElementPixel (hWnd, GetWindowStyle(hWnd)&WS_DISABLED?
|
||||
WE_FGC_DISABLED_ITEM : WE_FGC_WINDOW));
|
||||
GetWindowElementPixelEx (hWnd, hdc,
|
||||
(GetWindowStyle(hWnd) & WS_DISABLED) ?
|
||||
WE_FGC_DISABLED_ITEM : WE_FGC_WINDOW));
|
||||
}
|
||||
else {
|
||||
SetBkMode (hdc, BM_OPAQUE);
|
||||
|
||||
SetTextColor (hdc,
|
||||
GetWindowElementPixel (hWnd, GetWindowStyle(hWnd)&WS_DISABLED?
|
||||
GetWindowElementPixelEx (hWnd, hdc,
|
||||
(GetWindowStyle(hWnd) & WS_DISABLED) ?
|
||||
WE_FGC_DISABLED_ITEM : WE_FGC_SELECTED_ITEM));
|
||||
|
||||
if (hWnd == GetFocus(GetParent(hWnd))) {
|
||||
SetBkColor (hdc, GetWindowElementPixel (hWnd, WE_BGC_SELECTED_ITEM));
|
||||
SetBkColor (hdc, GetWindowElementPixelEx (hWnd,
|
||||
hdc, WE_BGC_SELECTED_ITEM));
|
||||
}
|
||||
else {
|
||||
SetBkColor (hdc, GetWindowElementPixel (hWnd, WE_BGC_SELECTED_LOSTFOCUS));
|
||||
SetBkColor (hdc, GetWindowElementPixelEx (hWnd,
|
||||
hdc, WE_BGC_SELECTED_LOSTFOCUS));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3601,7 +3605,8 @@ BOOL RegisterTextEditControl (void)
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = TextEditCtrlProc;
|
||||
|
||||
|
@ -105,7 +105,8 @@ static void TrackBarOnDraw (HWND hwnd, HDC hdc, TRACKBARDATA* pData, DWORD dwSty
|
||||
|
||||
SetBkMode (hdc, BM_TRANSPARENT);
|
||||
SetBkColor (hdc, GetWindowBkColor (hwnd));
|
||||
SetTextColor (hdc, GetWindowElementPixel (hwnd, WE_FGC_THREED_BODY));
|
||||
SetTextColor (hdc,
|
||||
GetWindowElementPixelEx (hwnd, hdc, WE_FGC_THREED_BODY));
|
||||
|
||||
TextOut (hdc, x + 1, y + (h>>1) - (sliderh>>1) - GAP_TIP_SLIDER,
|
||||
pData->sStartTip);
|
||||
@ -546,8 +547,8 @@ BOOL RegisterTrackBarControl (void)
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL,
|
||||
WE_MAINC_THREED_BODY);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL,
|
||||
WE_MAINC_THREED_BODY);
|
||||
WndClass.iBkColor = GetWindowElementPixelEx (HWND_NULL,
|
||||
HDC_SCREEN, WE_MAINC_THREED_BODY);
|
||||
#endif
|
||||
WndClass.WinProc = TrackBarCtrlProc;
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
|
@ -79,7 +79,8 @@ BOOL RegisterAnimationControl (void)
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = AnimationCtrlProc;
|
||||
|
||||
@ -295,10 +296,11 @@ static void setup_anim_mem_dc (HWND hwnd, ANIMATIONINFO* anim_info)
|
||||
|
||||
if (GetWindowStyle (hwnd) & ANS_WINBGC) {
|
||||
if (hwnd != HWND_NULL) {
|
||||
bk_pixel = GetWindowElementPixel (hwnd, WE_BGC_WINDOW);
|
||||
bk_pixel = GetWindowElementPixelEx (hwnd, hdc, WE_BGC_WINDOW);
|
||||
}
|
||||
else {
|
||||
bk_pixel = GetWindowElementPixel (HWND_DESKTOP, WE_BGC_DESKTOP);
|
||||
bk_pixel = GetWindowElementPixelEx (HWND_DESKTOP,
|
||||
hdc, WE_BGC_DESKTOP);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -85,8 +85,8 @@ BOOL RegisterCoolBarControl (void)
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL,
|
||||
WE_MAINC_THREED_BODY);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_DESKTOP,
|
||||
WE_MAINC_THREED_BODY);
|
||||
WndClass.iBkColor = GetWindowElementPixelEx (HWND_DESKTOP,
|
||||
HDC_SCREEN, WE_MAINC_THREED_BODY);
|
||||
#endif
|
||||
WndClass.WinProc = CoolBarCtrlProc;
|
||||
|
||||
|
@ -2532,7 +2532,8 @@ BOOL RegisterGridViewControl (void)
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = GridViewCtrlProc;
|
||||
|
||||
|
@ -503,15 +503,11 @@ void GridCellTypeTableHeader_get_format(gvGridCellData* cell, HWND hWnd, HDC hdc
|
||||
memset(format, 0, sizeof(GridCellFormat));
|
||||
format->mask = 0;
|
||||
|
||||
//format->color_bg = GetWindowElementColor (BKC_BUTTON_DEF);
|
||||
//format->hl_color_bg = GetWindowElementColor (BKC_HILIGHT_NORMAL);
|
||||
format->color_bg = GetWindowElementPixelEx(hWnd, hdc, WE_MAINC_THREED_BODY);
|
||||
format->hl_color_bg = GetWindowElementPixelEx(hWnd, hdc, WE_BGC_HIGHLIGHT_ITEM);
|
||||
if(cell->mask & GVITEM_BGCOLOR)
|
||||
format->color_bg = format->hl_color_bg = cell->data.header.color_bg;
|
||||
|
||||
//format->color_fg = GetWindowElementColor (FGC_BUTTON_NORMAL);
|
||||
//format->hl_color_fg = GetWindowElementColor (FGC_HILIGHT_NORMAL);
|
||||
format->color_fg = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_THREED_BODY);
|
||||
format->hl_color_fg = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_HIGHLIGHT_ITEM);
|
||||
if(cell->mask & GVITEM_FGCOLOR)
|
||||
@ -709,15 +705,11 @@ void GridCellTypeHeader_get_format(gvGridCellData* cell, HWND hWnd, HDC hdc, Gri
|
||||
memset(format, 0, sizeof(GridCellFormat));
|
||||
|
||||
format->mask = 0;
|
||||
// format->color_bg = GetWindowElementColor (BKC_BUTTON_DEF);
|
||||
// format->hl_color_bg = GetWindowElementColor (BKC_HILIGHT_NORMAL);
|
||||
format->color_bg = GetWindowElementPixelEx(hWnd, hdc, WE_MAINC_THREED_BODY);
|
||||
format->hl_color_bg = GetWindowElementPixelEx(hWnd, hdc, WE_BGC_HIGHLIGHT_ITEM);
|
||||
if(cell->mask & GVITEM_BGCOLOR)
|
||||
format->color_bg = format->hl_color_bg = cell->data.header.color_bg;
|
||||
|
||||
//format->color_fg = GetWindowElementColor (FGC_BUTTON_NORMAL);
|
||||
//format->hl_color_fg = GetWindowElementColor (FGC_HILIGHT_NORMAL);
|
||||
format->color_fg = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_THREED_BODY);
|
||||
format->hl_color_fg = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_THREED_BODY);
|
||||
if(cell->mask & GVITEM_FGCOLOR)
|
||||
@ -870,8 +862,6 @@ void GridCellTypeText_get_format(gvGridCellData* cell, HWND hWnd, HDC hdc, GridC
|
||||
memset(format, 0, sizeof(GridCellFormat));
|
||||
format->mask = 0;
|
||||
|
||||
// format->color_bg = GetWindowElementColor (BKC_EDIT_DEF);
|
||||
// format->hl_color_bg = GetWindowElementColor (BKC_HILIGHT_NORMAL);
|
||||
format->color_bg = GetWindowElementPixelEx(hWnd, hdc, WE_BGC_WINDOW);
|
||||
format->hl_color_bg = GetWindowElementPixelEx(hWnd, hdc, WE_BGC_HIGHLIGHT_ITEM);
|
||||
if(cell->mask & GVITEM_BGCOLOR) {
|
||||
@ -879,8 +869,6 @@ void GridCellTypeText_get_format(gvGridCellData* cell, HWND hWnd, HDC hdc, GridC
|
||||
format->hl_color_bg = ~cell->data.text.color_bg;
|
||||
}
|
||||
|
||||
// format->color_fg = GetWindowElementColor (FGC_CONTROL_NORMAL);
|
||||
// format->hl_color_fg = GetWindowElementColor (FGC_HILIGHT_NORMAL);
|
||||
format->color_fg = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_WINDOW);
|
||||
format->hl_color_fg = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_HIGHLIGHT_ITEM);
|
||||
if(cell->mask & GVITEM_FGCOLOR) {
|
||||
@ -1133,8 +1121,6 @@ void GridCellTypeNumber_get_format(gvGridCellData* cell, HWND hWnd, HDC hdc, Gri
|
||||
memset(format, 0, sizeof(GridCellFormat));
|
||||
format->mask = 0;
|
||||
|
||||
// format->color_bg = GetWindowElementColor (BKC_EDIT_DEF);
|
||||
// format->hl_color_bg = GetWindowElementColor (BKC_HILIGHT_NORMAL);
|
||||
format->color_bg = GetWindowElementPixelEx(hWnd, hdc, WE_BGC_WINDOW);
|
||||
format->hl_color_bg = GetWindowElementPixelEx(hWnd, hdc, WE_BGC_HIGHLIGHT_ITEM);
|
||||
if(cell->mask & GVITEM_BGCOLOR) {
|
||||
@ -1142,8 +1128,6 @@ void GridCellTypeNumber_get_format(gvGridCellData* cell, HWND hWnd, HDC hdc, Gri
|
||||
format->hl_color_bg = ~cell->data.number.color_bg;
|
||||
}
|
||||
|
||||
// format->color_fg = GetWindowElementColor (FGC_CONTROL_NORMAL);
|
||||
// format->hl_color_fg = GetWindowElementColor (FGC_HILIGHT_NORMAL);
|
||||
format->color_fg = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_WINDOW);
|
||||
format->hl_color_fg = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_HIGHLIGHT_ITEM);
|
||||
if(cell->mask & GVITEM_FGCOLOR) {
|
||||
@ -1315,8 +1299,6 @@ void GridCellTypeCheckBox_get_format(gvGridCellData* cell, HWND hWnd, HDC hdc, G
|
||||
memset(format, 0, sizeof(GridCellFormat));
|
||||
format->mask = 0;
|
||||
|
||||
//format->color_bg = GetWindowElementColor (BKC_CONTROL_DEF);
|
||||
//format->hl_color_bg = GetWindowElementColor (BKC_HILIGHT_NORMAL);
|
||||
format->color_bg = GetWindowElementPixelEx(hWnd, hdc, WE_MAINC_THREED_BODY);
|
||||
format->hl_color_bg = GetWindowElementPixelEx(hWnd, hdc, WE_BGC_HIGHLIGHT_ITEM);
|
||||
if(cell->mask & GVITEM_BGCOLOR) {
|
||||
@ -1324,8 +1306,6 @@ void GridCellTypeCheckBox_get_format(gvGridCellData* cell, HWND hWnd, HDC hdc, G
|
||||
format->hl_color_bg = ~cell->data.checkbox.color_bg;
|
||||
}
|
||||
|
||||
//format->color_fg = GetWindowElementColor (FGC_CONTROL_NORMAL);
|
||||
//format->hl_color_fg = GetWindowElementColor (FGC_HILIGHT_NORMAL);
|
||||
format->color_fg = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_THREED_BODY);
|
||||
format->hl_color_fg = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_HIGHLIGHT_ITEM);
|
||||
if(cell->mask & GVITEM_FGCOLOR) {
|
||||
@ -1582,8 +1562,6 @@ void GridCellTypeSelection_get_format(gvGridCellData* cell, HWND hWnd, HDC hdc,
|
||||
memset(format, 0, sizeof(GridCellFormat));
|
||||
format->mask = 0;
|
||||
|
||||
//format->color_bg = GetWindowElementColor (BKC_CONTROL_DEF);
|
||||
//format->hl_color_bg = GetWindowElementColor (BKC_HILIGHT_NORMAL);
|
||||
format->color_bg = GetWindowElementPixelEx(hWnd, hdc, WE_MAINC_THREED_BODY);
|
||||
format->hl_color_bg = GetWindowElementPixelEx(hWnd, hdc, WE_BGC_HIGHLIGHT_ITEM);
|
||||
if(cell->mask & GVITEM_BGCOLOR) {
|
||||
@ -1591,8 +1569,6 @@ void GridCellTypeSelection_get_format(gvGridCellData* cell, HWND hWnd, HDC hdc,
|
||||
format->hl_color_bg = ~cell->data.selection.color_bg;
|
||||
}
|
||||
|
||||
//format->color_fg = GetWindowElementColor (FGC_CONTROL_NORMAL);
|
||||
//format->hl_color_fg = GetWindowElementColor (FGC_HILIGHT_NORMAL);
|
||||
format->color_fg = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_THREED_BODY);
|
||||
format->hl_color_fg = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_HIGHLIGHT_ITEM);
|
||||
if(cell->mask & GVITEM_FGCOLOR) {
|
||||
|
@ -380,12 +380,12 @@ static void ivDrawItem (HWND hWnd, GHANDLE hivi, HDC hdc, RECT *rcDraw)
|
||||
SetBkMode (hdc, BM_TRANSPARENT);
|
||||
|
||||
if (iconview_is_item_hilight(hWnd, hivi)) {
|
||||
SetTextColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_HIGHLIGHT_ITEM));
|
||||
SetTextColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_FGC_HIGHLIGHT_ITEM));
|
||||
win_info->we_rdr->draw_hilite_item (hWnd, hdc, rcDraw,
|
||||
GetWindowElementAttr (hWnd, WE_BGC_HIGHLIGHT_ITEM));
|
||||
}
|
||||
else {
|
||||
SetTextColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_WINDOW));
|
||||
SetTextColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_FGC_WINDOW));
|
||||
// win_info->we_rdr->draw_normal_item (hWnd, hdc, rcDraw,
|
||||
// GetWindowElementAttr (hWnd, WE_BGC_WINDOW));
|
||||
}
|
||||
@ -726,7 +726,8 @@ BOOL RegisterIconViewControl (void)
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = IconViewCtrlProc;
|
||||
|
||||
|
@ -1290,9 +1290,9 @@ static void setup_color (HWND hWnd, PLVDATA plvdata)
|
||||
{
|
||||
int color;
|
||||
|
||||
color = (GetFocusChild(GetParent(hWnd)) == hWnd) ?
|
||||
WE_BGC_SELECTED_ITEM: WE_BGC_SELECTED_LOSTFOCUS;
|
||||
plvdata->bkc_selected = GetWindowElementPixel (hWnd, color);
|
||||
color = (GetFocusChild (GetParent(hWnd)) == hWnd) ?
|
||||
WE_BGC_SELECTED_ITEM : WE_BGC_SELECTED_LOSTFOCUS;
|
||||
plvdata->bkc_selected = GetWindowElementPixelEx (hWnd, HDC_INVALID, color);
|
||||
}
|
||||
|
||||
static SVITEMOPS listview_iops =
|
||||
@ -2202,7 +2202,8 @@ BOOL RegisterListViewControl (void)
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = ListViewCtrlProc;
|
||||
|
||||
|
@ -95,22 +95,22 @@
|
||||
#define ARROW_BORDER 10
|
||||
|
||||
// color info
|
||||
#define MCCLR_DF_TITLEBK GetWindowElementPixel(hWnd, WE_MAINC_THREED_BODY)
|
||||
#define MCCLR_DF_TITLETEXT GetWindowElementPixel(hWnd, WE_FGC_THREED_BODY)
|
||||
#define MCCLR_DF_TITLEBK GetWindowElementPixelEx(hWnd, HDC_INVALID, WE_MAINC_THREED_BODY)
|
||||
#define MCCLR_DF_TITLETEXT GetWindowElementPixelEx(hWnd, HDC_INVALID, WE_FGC_THREED_BODY)
|
||||
|
||||
#define MCCLR_DF_ARROW GetWindowElementPixel(hWnd, WE_FGC_WINDOW)
|
||||
#define MCCLR_DF_ARROWHIBK GetWindowElementPixel(hWnd, WE_BGC_WINDOW)
|
||||
#define MCCLR_DF_ARROW GetWindowElementPixelEx(hWnd, HDC_INVALID, WE_FGC_WINDOW)
|
||||
#define MCCLR_DF_ARROWHIBK GetWindowElementPixelEx(hWnd, HDC_INVALID, WE_BGC_WINDOW)
|
||||
|
||||
#define MCCLR_DF_DAYBK GetWindowElementPixel(hWnd, WE_BGC_WINDOW)
|
||||
#define MCCLR_DF_DAYTEXT GetWindowElementPixel(hWnd, WE_FGC_WINDOW)
|
||||
#define MCCLR_DF_DAYBK GetWindowElementPixelEx(hWnd, HDC_INVALID, WE_BGC_WINDOW)
|
||||
#define MCCLR_DF_DAYTEXT GetWindowElementPixelEx(hWnd, HDC_INVALID, WE_FGC_WINDOW)
|
||||
|
||||
#define MCCLR_DF_DAYHIBK GetWindowElementPixel(hWnd, WE_BGC_HIGHLIGHT_ITEM)
|
||||
#define MCCLR_DF_DAYHITEXT GetWindowElementPixel(hWnd, WE_FGC_HIGHLIGHT_ITEM)
|
||||
#define MCCLR_DF_DAYHIBK GetWindowElementPixelEx(hWnd, HDC_INVALID, WE_BGC_HIGHLIGHT_ITEM)
|
||||
#define MCCLR_DF_DAYHITEXT GetWindowElementPixelEx(hWnd, HDC_INVALID, WE_FGC_HIGHLIGHT_ITEM)
|
||||
|
||||
#define MCCLR_DF_TRAILINGTEXT GetWindowElementPixel(hWnd, WE_FGC_DISABLED_ITEM)
|
||||
#define MCCLR_DF_TRAILINGTEXT GetWindowElementPixelEx(hWnd, HDC_INVALID, WE_FGC_DISABLED_ITEM)
|
||||
|
||||
#define MCCLR_DF_WEEKCAPTBK GetWindowElementPixel(hWnd, WE_BGC_HIGHLIGHT_ITEM)
|
||||
#define MCCLR_DF_WEEKCAPTTEXT GetWindowElementPixel(hWnd, WE_FGC_HIGHLIGHT_ITEM)
|
||||
#define MCCLR_DF_WEEKCAPTBK GetWindowElementPixelEx(hWnd, HDC_INVALID, WE_BGC_HIGHLIGHT_ITEM)
|
||||
#define MCCLR_DF_WEEKCAPTTEXT GetWindowElementPixelEx(hWnd, HDC_INVALID, WE_FGC_HIGHLIGHT_ITEM)
|
||||
|
||||
static LRESULT MonthCalendarCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
@ -125,7 +125,8 @@ BOOL RegisterMonthCalendarControl (void)
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_DESKTOP, WE_BGC_WINDOW);
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixelEx (HWND_DESKTOP, HDC_SCREEN, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = MonthCalendarCtrlProc;
|
||||
|
||||
@ -439,7 +440,7 @@ static void mcHilightRect (HWND hWnd, PMONCALDDATA mc_data, HDC hdc, RECT* prcIt
|
||||
item_w = prcItem->right - prcItem->left;
|
||||
item_h = prcItem->bottom - prcItem->top;
|
||||
FillBox (hdc, prcItem->left, prcItem->top, item_w, item_h);
|
||||
SetPenColor(hdc, GetWindowElementPixel (hWnd, WE_MAINC_THREED_BODY));
|
||||
SetPenColor(hdc, GetWindowElementPixelEx (hWnd, hdc, WE_MAINC_THREED_BODY));
|
||||
Rectangle (hdc, prcItem->left, prcItem->top, prcItem->left+item_w-1, prcItem->top+item_h-1);
|
||||
if (day < 10)
|
||||
sprintf (daytext, " %d", day);
|
||||
@ -515,7 +516,8 @@ static void mcDrawMonthDay (HWND hWnd, HDC hdc, RECT* prcMDay, PMONCALDDATA mc_d
|
||||
FillBox (hdc, rcMonthDay.left, rcMonthDay.top,
|
||||
mc_data->item_w, mc_data->item_h);
|
||||
|
||||
SetPenColor(hdc, GetWindowElementPixel (hWnd, WE_MAINC_THREED_BODY));
|
||||
SetPenColor(hdc,
|
||||
GetWindowElementPixelEx (hWnd, hdc, WE_MAINC_THREED_BODY));
|
||||
Rectangle (hdc, rcMonthDay.left, rcMonthDay.top,
|
||||
rcMonthDay.left+mc_data->item_w-1 ,
|
||||
rcMonthDay.top+mc_data->item_h-1);
|
||||
@ -780,16 +782,16 @@ static BOOL mcInitMonthCalendarData (HWND hWnd, MONCALDDATA* mc_data)
|
||||
|
||||
// color info
|
||||
pmcci = (PMCCOLORINFO) mc_data->dwClrData;
|
||||
pmcci->clr_titlebk = MCCLR_DF_TITLEBK;
|
||||
pmcci->clr_titletext = MCCLR_DF_TITLETEXT;
|
||||
pmcci->clr_arrow = MCCLR_DF_ARROW;
|
||||
pmcci->clr_arrowHibk = MCCLR_DF_ARROWHIBK;
|
||||
pmcci->clr_titlebk = MCCLR_DF_TITLEBK;
|
||||
pmcci->clr_titletext = MCCLR_DF_TITLETEXT;
|
||||
pmcci->clr_arrow = MCCLR_DF_ARROW;
|
||||
pmcci->clr_arrowHibk = MCCLR_DF_ARROWHIBK;
|
||||
pmcci->clr_daybk = MCCLR_DF_DAYBK;
|
||||
pmcci->clr_dayHibk = MCCLR_DF_DAYHIBK;
|
||||
pmcci->clr_daytext = MCCLR_DF_DAYTEXT;
|
||||
pmcci->clr_trailingtext = MCCLR_DF_TRAILINGTEXT;
|
||||
pmcci->clr_dayHibk = MCCLR_DF_DAYHIBK;
|
||||
pmcci->clr_daytext = MCCLR_DF_DAYTEXT;
|
||||
pmcci->clr_trailingtext = MCCLR_DF_TRAILINGTEXT;
|
||||
pmcci->clr_dayHitext = MCCLR_DF_DAYHITEXT;
|
||||
pmcci->clr_weekcaptbk = MCCLR_DF_WEEKCAPTBK;
|
||||
pmcci->clr_weekcaptbk = MCCLR_DF_WEEKCAPTBK;
|
||||
pmcci->clr_weekcapttext = MCCLR_DF_WEEKCAPTTEXT;
|
||||
|
||||
mc_data->customed_day = 0;
|
||||
|
@ -414,7 +414,8 @@ BOOL RegisterSpinControl (void)
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = SpinCtrlProc;
|
||||
|
||||
|
@ -115,7 +115,8 @@ BOOL RegisterTreeViewControl (void)
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = TreeViewCtrlProc;
|
||||
|
||||
@ -652,8 +653,8 @@ static void tvDrawItem (HWND hWnd, HDC hdc, PTVDATA pData, int centerX, int cent
|
||||
|
||||
if (p->dwFlags & TVIF_SELECTED) {
|
||||
SetBkMode (hdc, BM_OPAQUE);
|
||||
SetBkColor (hdc, GetWindowElementColorEx (hWnd, BKC_HILIGHT_NORMAL));
|
||||
SetTextColor (hdc, GetWindowElementColorEx (hWnd, FGC_HILIGHT_NORMAL));
|
||||
SetBkColor (hdc, GetWindowElementPixelEx (hWnd, hdc, BKC_HILIGHT_NORMAL));
|
||||
SetTextColor (hdc, GetWindowElementPixelEx (hWnd, hdc, FGC_HILIGHT_NORMAL));
|
||||
TextOut (hdc, centerX, centerY - (h>>1), p->text);
|
||||
#ifndef _GRAY_SCREEN
|
||||
if (pData->dwStyle & TVS_FOCUS) {
|
||||
@ -665,7 +666,7 @@ static void tvDrawItem (HWND hWnd, HDC hdc, PTVDATA pData, int centerX, int cent
|
||||
} else {
|
||||
SetBkMode (hdc, BM_TRANSPARENT);
|
||||
SetBkColor (hdc, GetWindowBkColor (hWnd));
|
||||
SetTextColor (hdc, GetWindowElementColorEx (hWnd, FGC_CONTROL_NORMAL));
|
||||
SetTextColor (hdc, GetWindowElementPixelEx (hWnd, hdc, FGC_CONTROL_NORMAL));
|
||||
TextOut (hdc, centerX, centerY - (h>>1), p->text);
|
||||
}
|
||||
}
|
||||
|
@ -87,7 +87,8 @@ BOOL RegisterTreeViewRdrControl (void)
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = TreeViewCtrlProc;
|
||||
|
||||
@ -626,8 +627,8 @@ static void tvDrawItem (HWND hWnd, HDC hdc, PTVDATA pData, int centerX,
|
||||
if (p->dwFlags & TVIF_SELECTED)
|
||||
{
|
||||
SetBkMode (hdc, BM_OPAQUE);
|
||||
SetBkColor (hdc, GetWindowElementPixel (hWnd, WE_BGC_HIGHLIGHT_ITEM));
|
||||
SetTextColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_HIGHLIGHT_ITEM));
|
||||
SetBkColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_BGC_HIGHLIGHT_ITEM));
|
||||
SetTextColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_FGC_HIGHLIGHT_ITEM));
|
||||
|
||||
rc.left = centerX;
|
||||
rc.top = centerY - (h>>1);
|
||||
@ -644,7 +645,7 @@ static void tvDrawItem (HWND hWnd, HDC hdc, PTVDATA pData, int centerX,
|
||||
} else {
|
||||
SetBkMode (hdc, BM_TRANSPARENT);
|
||||
SetBkColor (hdc, GetWindowBkColor (hWnd));
|
||||
SetTextColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_WINDOW));
|
||||
SetTextColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_FGC_WINDOW));
|
||||
|
||||
TextOut (hdc, centerX, centerY - (h>>1), p->text);
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ HWND GUIAPI CreateMainWindowIndirectParamEx (PDLGTEMPLATE pDlgTemplate,
|
||||
CreateInfo.rx = pDlgTemplate->x + pDlgTemplate->w;
|
||||
CreateInfo.by = pDlgTemplate->y + pDlgTemplate->h;
|
||||
CreateInfo.iBkColor =
|
||||
GetWindowElementPixel (HWND_NULL, WE_MAINC_THREED_BODY);
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_MAINC_THREED_BODY);
|
||||
CreateInfo.dwAddData = pDlgTemplate->dwAddData;
|
||||
CreateInfo.hHosting = hOwner;
|
||||
|
||||
|
@ -2272,9 +2272,9 @@ static void draw_border (HWND hWnd, HDC hdc, BOOL is_active)
|
||||
return ;
|
||||
|
||||
if(is_active)
|
||||
border_color = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_ACTIVE_WND_BORDER);
|
||||
border_color = GetWindowElementPixelEx (hWnd, hdc, WE_FGC_ACTIVE_WND_BORDER);
|
||||
else
|
||||
border_color = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_INACTIVE_WND_BORDER);
|
||||
border_color = GetWindowElementPixelEx (hWnd, hdc, WE_FGC_INACTIVE_WND_BORDER);
|
||||
|
||||
win_info = GetWindowInfo(hWnd);
|
||||
|
||||
@ -2420,11 +2420,11 @@ static void draw_caption (HWND hWnd, HDC hdc, BOOL is_active)
|
||||
if (!(win_info->dwStyle & WS_CAPTION))
|
||||
return;
|
||||
|
||||
active_color = GetWindowElementPixelEx(hWnd, hdc, WE_BGCA_ACTIVE_CAPTION);
|
||||
inactive_color = GetWindowElementPixelEx(hWnd, hdc, WE_BGCA_INACTIVE_CAPTION);
|
||||
text_active_color = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_ACTIVE_CAPTION);
|
||||
text_inact_color = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_INACTIVE_CAPTION);
|
||||
cap_font = (PLOGFONT)GetWindowElementAttr(hWnd, WE_FONT_CAPTION);
|
||||
active_color = GetWindowElementPixelEx (hWnd, hdc, WE_BGCA_ACTIVE_CAPTION);
|
||||
inactive_color = GetWindowElementPixelEx (hWnd, hdc, WE_BGCA_INACTIVE_CAPTION);
|
||||
text_active_color = GetWindowElementPixelEx (hWnd, hdc, WE_FGC_ACTIVE_CAPTION);
|
||||
text_inact_color = GetWindowElementPixelEx (hWnd, hdc, WE_FGC_INACTIVE_CAPTION);
|
||||
cap_font = (PLOGFONT)GetWindowElementAttr (hWnd, WE_FONT_CAPTION);
|
||||
|
||||
if (calc_we_area(hWnd, HT_CAPTION, &rect) == -1)
|
||||
return;
|
||||
@ -2969,7 +2969,7 @@ static void draw_trackbar_thumb (HWND hWnd, HDC hdc,
|
||||
|
||||
GetWindowInfo(hWnd)->we_rdr->draw_3dbox (hdc, &rc_draw, color_thumb, tbstatus);
|
||||
|
||||
SetPenColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_THREED_BODY));
|
||||
SetPenColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_FGC_THREED_BODY));
|
||||
if (dwStyle & TBS_VERTICAL) {
|
||||
MoveTo (hdc, sliderx + (sliderw >> 1) - 3 - 1,
|
||||
slidery + (sliderh >> 1));
|
||||
@ -3125,7 +3125,7 @@ draw_trackbar (HWND hWnd, HDC hdc, LFRDR_TRACKBARINFO *info)
|
||||
|
||||
/* draw the tick of trackbar. */
|
||||
if (!(dwStyle & TBS_NOTICK)) {
|
||||
SetPenColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_THREED_BODY));
|
||||
SetPenColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_FGC_THREED_BODY));
|
||||
if (dwStyle & TBS_VERTICAL) {
|
||||
TickStart = y + (HEIGHT_VERT_SLIDER >> 1);
|
||||
fTickGap = itofix (h - HEIGHT_VERT_SLIDER);
|
||||
@ -3364,7 +3364,7 @@ draw_progress (HWND hWnd, HDC hdc,
|
||||
old_color = SetBrushColor (hdc, GetWindowBkColor (hWnd));
|
||||
else
|
||||
old_color = SetBrushColor (hdc,
|
||||
GetWindowElementPixel (HWND_DESKTOP, WE_BGC_DESKTOP));
|
||||
GetWindowElementPixelEx (HWND_DESKTOP, hdc, WE_BGC_DESKTOP));
|
||||
|
||||
//draw the erase background
|
||||
FillBox (hdc, rcClient.left + 1, rcClient.top + 1, RECTW (rcClient) - 2, RECTH (rcClient) - 2);
|
||||
@ -3384,7 +3384,7 @@ draw_progress (HWND hWnd, HDC hdc,
|
||||
nRem = ndiv_progress.rem;
|
||||
|
||||
SetBrushColor (hdc,
|
||||
GetWindowElementPixel (hWnd, WE_BGC_HIGHLIGHT_ITEM));
|
||||
GetWindowElementPixelEx (hWnd, hdc, WE_BGC_HIGHLIGHT_ITEM));
|
||||
|
||||
if (whOne >= 4) {
|
||||
if (fVertical) {
|
||||
@ -3440,15 +3440,15 @@ draw_progress (HWND hWnd, HDC hdc,
|
||||
rc_clip.right = prog;
|
||||
SelectClipRect (hdc, &rc_clip);
|
||||
SetTextColor (hdc,
|
||||
GetWindowElementPixel (hWnd, WE_FGC_HIGHLIGHT_ITEM));
|
||||
GetWindowElementPixelEx (hWnd, hdc, WE_FGC_HIGHLIGHT_ITEM));
|
||||
SetBkColor (hdc,
|
||||
GetWindowElementPixel (hWnd, WE_BGC_HIGHLIGHT_ITEM));
|
||||
GetWindowElementPixelEx (hWnd, hdc, WE_BGC_HIGHLIGHT_ITEM));
|
||||
TextOut (hdc, x, y, szText);
|
||||
|
||||
rc_clip.right = rcClient.right;
|
||||
rc_clip.left = prog;
|
||||
SelectClipRect (hdc, &rc_clip);
|
||||
SetTextColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_WINDOW));
|
||||
SetTextColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_FGC_WINDOW));
|
||||
SetBkColor (hdc, GetWindowBkColor (hWnd));
|
||||
TextOut (hdc, x, y, szText);
|
||||
}
|
||||
|
@ -162,7 +162,7 @@ static inline void erase_bkgnd (HWND hWnd, HDC hdc, const RECT *rect)
|
||||
old_color = SetBrushColor (hdc, GetWindowBkColor (hWnd));
|
||||
else
|
||||
old_color = SetBrushColor (hdc,
|
||||
GetWindowElementPixel (HWND_DESKTOP, WE_BGC_DESKTOP));
|
||||
GetWindowElementPixelEx (HWND_DESKTOP, hdc, WE_BGC_DESKTOP));
|
||||
|
||||
FillBox(hdc, rect->left, rect->top, RECTWP(rect), RECTHP(rect));
|
||||
SetBrushColor (hdc, old_color);
|
||||
|
@ -4104,7 +4104,7 @@ draw_trackbar (HWND hWnd, HDC hdc, LFRDR_TRACKBARINFO *info)
|
||||
|
||||
/* draw the tick of trackbar. */
|
||||
if (!(dwStyle & TBS_NOTICK)) {
|
||||
SetPenColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_THREED_BODY));
|
||||
SetPenColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_FGC_THREED_BODY));
|
||||
if (dwStyle & TBS_VERTICAL) {
|
||||
TickStart = y + (HEIGHT_VERT_SLIDER >> 1);
|
||||
//TickGap = (h - HEIGHT_VERT_SLIDER) / (float)(max - min) * TickFreq;
|
||||
@ -4489,7 +4489,7 @@ draw_progress (HWND hWnd, HDC hdc,
|
||||
x += ((w - text_ext.cx) >> 1) + 1;
|
||||
y += ((h - text_ext.cy) >> 1);
|
||||
|
||||
SetTextColor (hdc, GetWindowElementPixel (hWnd, WE_BGCB_ACTIVE_CAPTION));
|
||||
SetTextColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_BGCB_ACTIVE_CAPTION));
|
||||
TextOut (hdc, x, y, szText);
|
||||
}
|
||||
|
||||
|
@ -573,7 +573,8 @@ static void draw_3dbox (HDC hdc, const RECT* pRect, DWORD color, DWORD flag)
|
||||
|
||||
/*draw outer frame*/
|
||||
//dark_color = calc_3dbox_color (color, LFRDR_3DBOX_COLOR_DARKEST);
|
||||
old_pen_color = SetPenColor (hdc, GetWindowElementColor (WE_FGC_THREED_BODY));
|
||||
old_pen_color = SetPenColor (hdc,
|
||||
GetWindowElementPixelEx (HWND_NULL, hdc, WE_FGC_THREED_BODY));
|
||||
Rectangle (hdc, pRect->left, pRect->top,
|
||||
pRect->right - 1, pRect->bottom - 1);
|
||||
|
||||
@ -1210,7 +1211,7 @@ static void check_frame (HDC hdc, int x0, int y0, int x1, int y1)
|
||||
x1-=1;
|
||||
y1-=1;
|
||||
|
||||
pen_clr = GetWindowElementColor (WE_FGC_THREED_BODY);
|
||||
pen_clr = GetWindowElementPixelEx (HWND_NULL, hdc, WE_FGC_THREED_BODY);
|
||||
old_pen_clr = SetPenColor (hdc, pen_clr);
|
||||
|
||||
MoveTo (hdc, x1-4, y0+2);
|
||||
@ -1246,7 +1247,8 @@ static void normal_frame (HDC hdc, int x0, int y0, int x1, int y1)
|
||||
x1-=1;
|
||||
y1-=1;
|
||||
|
||||
old_pen_clr = SetPenColor (hdc, GetWindowElementColor (WE_FGC_THREED_BODY));
|
||||
old_pen_clr = SetPenColor (hdc,
|
||||
GetWindowElementPixelEx (HWND_NULL, hdc, WE_FGC_THREED_BODY));
|
||||
|
||||
MoveTo (hdc, x1, y0+4);
|
||||
LineTo (hdc, x1, y1-4);
|
||||
@ -1268,7 +1270,8 @@ static void DrawFlatControlFrameEx (HDC hdc, int x0, int y0, int x1, int y1)
|
||||
{
|
||||
gal_pixel old_color;
|
||||
|
||||
old_color = SetPenColor (hdc, GetWindowElementColor (WE_FGC_THREED_BODY));
|
||||
old_color = SetPenColor (hdc,
|
||||
GetWindowElementPixelEx (HWND_NULL, hdc, WE_FGC_THREED_BODY));
|
||||
x1-=1;
|
||||
y1-=1;
|
||||
|
||||
@ -2740,8 +2743,8 @@ static void draw_scrollbar (HWND hWnd, HDC hdc, int sb_pos)
|
||||
fgc_3d = GetWindowElementAttr(hWnd, WE_FGC_THREED_BODY);
|
||||
fgc_dis = GetWindowElementAttr(hWnd, WE_FGC_DISABLED_ITEM);
|
||||
|
||||
SetPenColor (hdc, GetWindowElementPixel(hWnd, WE_FGC_THREED_BODY));
|
||||
SetBrushColor (hdc, GetWindowElementPixel (hWnd, WE_MAINC_THREED_BODY));
|
||||
SetPenColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_FGC_THREED_BODY));
|
||||
SetBrushColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_MAINC_THREED_BODY));
|
||||
|
||||
if (0 == strncasecmp(CTRL_SCROLLBAR, GetClassName(hWnd), strlen(CTRL_SCROLLBAR)))
|
||||
{
|
||||
@ -2927,7 +2930,7 @@ static void draw_trackbar_thumb (HWND hWnd, HDC hdc,
|
||||
|
||||
win_info->we_rdr->draw_3dbox (hdc, &rc_draw, color_thumb, tbstatus);
|
||||
|
||||
SetPenColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_THREED_BODY));
|
||||
SetPenColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_FGC_THREED_BODY));
|
||||
if (dwStyle & TBS_VERTICAL) {
|
||||
MoveTo (hdc, sliderx + (sliderw >> 1) - 3 - 1,
|
||||
slidery + (sliderh >> 1));
|
||||
@ -3083,7 +3086,7 @@ draw_trackbar (HWND hWnd, HDC hdc, LFRDR_TRACKBARINFO *info)
|
||||
|
||||
/* draw the tick of trackbar. */
|
||||
if (!(dwStyle & TBS_NOTICK)) {
|
||||
SetPenColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_THREED_BODY));
|
||||
SetPenColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_FGC_THREED_BODY));
|
||||
if (dwStyle & TBS_VERTICAL) {
|
||||
TickStart = y + (HEIGHT_VERT_SLIDER >> 1);
|
||||
TickEnd = y + h - (HEIGHT_VERT_SLIDER >> 1);
|
||||
@ -3327,7 +3330,7 @@ draw_progress (HWND hWnd, HDC hdc,
|
||||
old_color = SetBrushColor (hdc, GetWindowBkColor (hWnd));
|
||||
else
|
||||
old_color = SetBrushColor (hdc,
|
||||
GetWindowElementPixel (HWND_DESKTOP, WE_BGC_DESKTOP));
|
||||
GetWindowElementPixelEx (HWND_DESKTOP, hdc, WE_BGC_DESKTOP));
|
||||
|
||||
FillBox (hdc, rcClient.left + 1, rcClient.top + 1, RECTW (rcClient), RECTH (rcClient));
|
||||
SetBrushColor (hdc, old_color);
|
||||
@ -3346,7 +3349,7 @@ draw_progress (HWND hWnd, HDC hdc,
|
||||
nRem = ndiv_progress.rem;
|
||||
|
||||
SetBrushColor (hdc,
|
||||
GetWindowElementPixel (hWnd, WE_BGC_HIGHLIGHT_ITEM));
|
||||
GetWindowElementPixelEx (hWnd, hdc, WE_BGC_HIGHLIGHT_ITEM));
|
||||
|
||||
if (whOne >= 4) {
|
||||
if (fVertical) {
|
||||
@ -3401,15 +3404,15 @@ draw_progress (HWND hWnd, HDC hdc,
|
||||
rc_clip.right = prog;
|
||||
SelectClipRect (hdc, &rc_clip);
|
||||
SetTextColor (hdc,
|
||||
GetWindowElementPixel (hWnd, WE_FGC_HIGHLIGHT_ITEM));
|
||||
GetWindowElementPixelEx (hWnd, hdc, WE_FGC_HIGHLIGHT_ITEM));
|
||||
SetBkColor (hdc,
|
||||
GetWindowElementPixel (hWnd, WE_BGC_HIGHLIGHT_ITEM));
|
||||
GetWindowElementPixelEx (hWnd, hdc, WE_BGC_HIGHLIGHT_ITEM));
|
||||
TextOut (hdc, x, y, szText);
|
||||
|
||||
rc_clip.right = rcClient.right;
|
||||
rc_clip.left = prog;
|
||||
SelectClipRect (hdc, &rc_clip);
|
||||
SetTextColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_WINDOW));
|
||||
SetTextColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_FGC_WINDOW));
|
||||
SetBkColor (hdc, GetWindowBkColor (hWnd));
|
||||
TextOut (hdc, x, y, szText);
|
||||
}
|
||||
|
@ -731,7 +731,6 @@ GetWindowElementPixelEx (HWND hwnd, HDC hdc, int we_attr_id)
|
||||
{
|
||||
DWORD data;
|
||||
Uint8 r, g, b, a;
|
||||
HDC dc;
|
||||
gal_pixel pixel;
|
||||
|
||||
if ((we_attr_id & WE_ATTR_TYPE_MASK) != WE_ATTR_TYPE_COLOR) {
|
||||
@ -740,9 +739,6 @@ GetWindowElementPixelEx (HWND hwnd, HDC hdc, int we_attr_id)
|
||||
}
|
||||
|
||||
data = GetWindowElementAttr (hwnd, we_attr_id);
|
||||
if (data < 0)
|
||||
return -1;
|
||||
|
||||
r = GetRValue (data);
|
||||
g = GetGValue (data);
|
||||
b = GetBValue (data);
|
||||
@ -752,9 +748,12 @@ GetWindowElementPixelEx (HWND hwnd, HDC hdc, int we_attr_id)
|
||||
if (hwnd == HWND_NULL || hwnd == HWND_DESKTOP)
|
||||
pixel = RGBA2Pixel (HDC_SCREEN, r, g, b, a);
|
||||
else {
|
||||
dc = GetDC (hwnd);
|
||||
pixel = RGBA2Pixel (dc, r, g, b, a);
|
||||
ReleaseDC (dc);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
PMAINWIN pWin = (PMAINWIN)hwnd;
|
||||
pixel = GAL_MapRGBA (pWin->surf->format, r, g, b, a);
|
||||
#else
|
||||
pixel = RGBA2Pixel (HDC_SCREEN, r, g, b, a);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -280,7 +280,8 @@ static void InitCreateInfo(PMAINWINCREATE pCreateInfo)
|
||||
pCreateInfo->ty = 0;
|
||||
pCreateInfo->rx = 520;
|
||||
pCreateInfo->by = 350;
|
||||
pCreateInfo->iBkColor = GetWindowElementColor (WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->dwAddData = 0;
|
||||
pCreateInfo->hHosting = HWND_DESKTOP;
|
||||
}
|
||||
|
@ -240,7 +240,8 @@ static void InitCreateInfo(PMAINWINCREATE pCreateInfo)
|
||||
pCreateInfo->ty = 0;
|
||||
pCreateInfo->rx = 400;
|
||||
pCreateInfo->by = 260;
|
||||
pCreateInfo->iBkColor = GetWindowElementColor (WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->dwAddData = 0;
|
||||
pCreateInfo->hHosting = HWND_DESKTOP;
|
||||
}
|
||||
|
@ -236,7 +236,8 @@ static void InitCreateInfo(PMAINWINCREATE pCreateInfo)
|
||||
pCreateInfo->ty = 0;
|
||||
pCreateInfo->rx = 400;
|
||||
pCreateInfo->by = 300;
|
||||
pCreateInfo->iBkColor = GetWindowElementColor (WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->dwAddData = 0;
|
||||
pCreateInfo->hHosting = HWND_DESKTOP;
|
||||
}
|
||||
|
@ -285,7 +285,8 @@ static void InitCreateInfo(PMAINWINCREATE pCreateInfo)
|
||||
pCreateInfo->ty = 0;
|
||||
pCreateInfo->rx = 600;
|
||||
pCreateInfo->by = 450;
|
||||
pCreateInfo->iBkColor = GetWindowElementColor (WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->dwAddData = 0;
|
||||
pCreateInfo->hHosting = HWND_DESKTOP;
|
||||
}
|
||||
|
@ -315,7 +315,8 @@ InitCreateInfo (PMAINWINCREATE pCreateInfo)
|
||||
pCreateInfo->ty = 0;
|
||||
pCreateInfo->rx = 500;
|
||||
pCreateInfo->by = 350;
|
||||
pCreateInfo->iBkColor = GetWindowElementColor (BKC_CONTROL_DEF);
|
||||
pCreateInfo->iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, BKC_CONTROL_DEF);
|
||||
pCreateInfo->dwAddData = 0;
|
||||
pCreateInfo->hHosting = HWND_DESKTOP;
|
||||
}
|
||||
|
@ -408,7 +408,8 @@ static void InitCreateInfo(PMAINWINCREATE pCreateInfo)
|
||||
pCreateInfo->ty = 0;
|
||||
pCreateInfo->rx = 500;
|
||||
pCreateInfo->by = 400;
|
||||
pCreateInfo->iBkColor = GetWindowElementColor (WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->dwAddData = 0;
|
||||
pCreateInfo->hHosting = HWND_DESKTOP;
|
||||
}
|
||||
|
@ -539,7 +539,8 @@ InitCreateInfo (PMAINWINCREATE pCreateInfo)
|
||||
pCreateInfo->ty = 0;
|
||||
pCreateInfo->rx = 500;
|
||||
pCreateInfo->by = 350;
|
||||
pCreateInfo->iBkColor = GetWindowElementColor (WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->dwAddData = 0;
|
||||
pCreateInfo->hHosting = HWND_DESKTOP;
|
||||
}
|
||||
|
@ -292,7 +292,8 @@ static void InitCreateInfo(PMAINWINCREATE pCreateInfo)
|
||||
pCreateInfo->ty = 0;
|
||||
pCreateInfo->rx = 300;
|
||||
pCreateInfo->by = 200;
|
||||
pCreateInfo->iBkColor = GetWindowElementColor (WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->dwAddData = 0;
|
||||
pCreateInfo->hHosting = HWND_DESKTOP;
|
||||
}
|
||||
|
@ -433,7 +433,8 @@ static void InitCreateInfo (PMAINWINCREATE pCreateInfo)
|
||||
pCreateInfo->ty = 0;
|
||||
pCreateInfo->rx = 640;
|
||||
pCreateInfo->by = 480;
|
||||
pCreateInfo->iBkColor = GetWindowElementColor (WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->dwAddData = 0;
|
||||
pCreateInfo->hHosting = HWND_DESKTOP;
|
||||
}
|
||||
|
@ -195,7 +195,8 @@ static void InitCreateInfo(PMAINWINCREATE pCreateInfo)
|
||||
pCreateInfo->ty = 0;
|
||||
pCreateInfo->rx = 300;
|
||||
pCreateInfo->by = 230;
|
||||
pCreateInfo->iBkColor = GetWindowElementColor (WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->dwAddData = 0;
|
||||
pCreateInfo->hHosting = HWND_DESKTOP;
|
||||
}
|
||||
|
@ -267,7 +267,8 @@ static void InitCreateInfo(PMAINWINCREATE pCreateInfo)
|
||||
pCreateInfo->ty = 0;
|
||||
pCreateInfo->rx = 520;
|
||||
pCreateInfo->by = 390;
|
||||
pCreateInfo->iBkColor = GetWindowElementPixel (HWND_NULL, WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->dwAddData = 0;
|
||||
pCreateInfo->hHosting = HWND_DESKTOP;
|
||||
}
|
||||
|
@ -174,7 +174,8 @@ static void InitCreateInfo(PMAINWINCREATE pCreateInfo)
|
||||
pCreateInfo->ty = 0;
|
||||
pCreateInfo->rx = 400;
|
||||
pCreateInfo->by = 300;
|
||||
pCreateInfo->iBkColor = GetWindowElementColor (WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->dwAddData = 0;
|
||||
pCreateInfo->hHosting = HWND_DESKTOP;
|
||||
}
|
||||
|
@ -237,7 +237,8 @@ static void InitCreateInfo(PMAINWINCREATE pCreateInfo)
|
||||
pCreateInfo->ty = 0;
|
||||
pCreateInfo->rx = 400;
|
||||
pCreateInfo->by = 300;
|
||||
pCreateInfo->iBkColor = GetWindowElementColor (WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->dwAddData = 0;
|
||||
pCreateInfo->hHosting = HWND_DESKTOP;
|
||||
}
|
||||
|
@ -214,7 +214,8 @@ static void InitCreateInfo(PMAINWINCREATE pCreateInfo)
|
||||
pCreateInfo->ty = 0;
|
||||
pCreateInfo->rx = 460;
|
||||
pCreateInfo->by = 380;
|
||||
pCreateInfo->iBkColor = GetWindowElementColor (WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->dwAddData = 0;
|
||||
pCreateInfo->dwReserved = 0;
|
||||
pCreateInfo->hHosting = HWND_DESKTOP;
|
||||
|
@ -215,7 +215,8 @@ static void InitCreateInfo(PMAINWINCREATE pCreateInfo)
|
||||
pCreateInfo->ty = 0;
|
||||
pCreateInfo->rx = 400;
|
||||
pCreateInfo->by = 300;
|
||||
pCreateInfo->iBkColor = GetWindowElementColor (WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_MAINC_THREED_BODY);
|
||||
pCreateInfo->dwAddData = 0;
|
||||
pCreateInfo->hHosting = HWND_DESKTOP;
|
||||
}
|
||||
|
@ -493,7 +493,8 @@ static void draw_3dbox (HDC hdc, const RECT* pRect, DWORD color, DWORD flag)
|
||||
|
||||
/*draw outer frame*/
|
||||
//dark_color = calc_3dbox_color (color, LFRDR_3DBOX_COLOR_DARKEST);
|
||||
old_pen_color = SetPenColor (hdc, GetWindowElementColor (WE_FGC_THREED_BODY));
|
||||
old_pen_color = SetPenColor (hdc,
|
||||
GetWindowElementPixelEx (HWND_DESKTOP, hdc, WE_FGC_THREED_BODY));
|
||||
Rectangle (hdc, pRect->left, pRect->top,
|
||||
pRect->right - 1, pRect->bottom - 1);
|
||||
|
||||
@ -1133,7 +1134,7 @@ static void check_frame (HDC hdc, int x0, int y0, int x1, int y1)
|
||||
x1-=1;
|
||||
y1-=1;
|
||||
|
||||
pen_clr = GetWindowElementColor (WE_FGC_THREED_BODY);
|
||||
pen_clr = GetWindowElementPixelEx (HWND_NULL, hdc, WE_FGC_THREED_BODY);
|
||||
old_pen_clr = SetPenColor (hdc, pen_clr);
|
||||
|
||||
MoveTo (hdc, x1-4, y0+2);
|
||||
@ -1169,7 +1170,8 @@ static void normal_frame (HDC hdc, int x0, int y0, int x1, int y1)
|
||||
x1-=1;
|
||||
y1-=1;
|
||||
|
||||
old_pen_clr = SetPenColor (hdc, GetWindowElementColor (WE_FGC_THREED_BODY));
|
||||
old_pen_clr = SetPenColor (hdc,
|
||||
GetWindowElementPixelEx (HWND_NULL, hdc, WE_FGC_THREED_BODY));
|
||||
|
||||
MoveTo (hdc, x1, y0+4);
|
||||
LineTo (hdc, x1, y1-4);
|
||||
@ -1191,7 +1193,8 @@ static void DrawFlatControlFrameEx (HDC hdc, int x0, int y0, int x1, int y1)
|
||||
{
|
||||
gal_pixel old_color;
|
||||
|
||||
old_color = SetPenColor (hdc, GetWindowElementColor (WE_FGC_THREED_BODY));
|
||||
old_color = SetPenColor (hdc,
|
||||
GetWindowElementPixelEx (HDC_NULL, hdc, WE_FGC_THREED_BODY));
|
||||
x1-=1;
|
||||
y1-=1;
|
||||
|
||||
@ -3331,8 +3334,8 @@ static void draw_scrollbar (HWND hWnd, HDC hdc, int sb_pos)
|
||||
return;
|
||||
}
|
||||
|
||||
old_pen_clr = SetPenColor (hdc, GetWindowElementPixel(hWnd, WE_FGC_THREED_BODY));
|
||||
old_bru_clr = SetBrushColor (hdc, GetWindowElementPixel (hWnd, WE_MAINC_THREED_BODY));
|
||||
old_pen_clr = SetPenColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_FGC_THREED_BODY));
|
||||
old_bru_clr = SetBrushColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_MAINC_THREED_BODY));
|
||||
|
||||
if (0 == strncasecmp(CTRL_SCROLLBAR, GetClassName(hWnd), strlen(CTRL_SCROLLBAR)))
|
||||
{
|
||||
@ -3529,7 +3532,7 @@ static void draw_trackbar_thumb (HWND hWnd, HDC hdc,
|
||||
|
||||
win_info->we_rdr->draw_3dbox (hdc, &rc_draw, color_thumb, tbstatus);
|
||||
|
||||
SetPenColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_THREED_BODY));
|
||||
SetPenColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_FGC_THREED_BODY));
|
||||
if (dwStyle & TBS_VERTICAL) {
|
||||
MoveTo (hdc, sliderx + (sliderw >> 1) - 3 - 1,
|
||||
slidery + (sliderh >> 1));
|
||||
@ -3685,7 +3688,7 @@ draw_trackbar (HWND hWnd, HDC hdc, LFRDR_TRACKBARINFO *info)
|
||||
|
||||
/* draw the tick of trackbar. */
|
||||
if (!(dwStyle & TBS_NOTICK)) {
|
||||
SetPenColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_THREED_BODY));
|
||||
SetPenColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_FGC_THREED_BODY));
|
||||
if (dwStyle & TBS_VERTICAL) {
|
||||
TickStart = y + (HEIGHT_VERT_SLIDER >> 1);
|
||||
TickEnd = y + h - (HEIGHT_VERT_SLIDER >> 1);
|
||||
@ -3955,7 +3958,7 @@ draw_progress (HWND hWnd, HDC hdc,
|
||||
nRem = ndiv_progress.rem;
|
||||
|
||||
SetBrushColor (hdc,
|
||||
GetWindowElementPixel (hWnd, WE_BGC_HIGHLIGHT_ITEM));
|
||||
GetWindowElementPixelEx (hWnd, hdc, WE_BGC_HIGHLIGHT_ITEM));
|
||||
|
||||
if (whOne >= 4) {
|
||||
if (fVertical) {
|
||||
@ -4011,15 +4014,15 @@ draw_progress (HWND hWnd, HDC hdc,
|
||||
rc_clip.right = prog;
|
||||
SelectClipRect (hdc, &rc_clip);
|
||||
SetTextColor (hdc,
|
||||
GetWindowElementPixel (hWnd, WE_FGC_HIGHLIGHT_ITEM));
|
||||
GetWindowElementPixelEx (hWnd, hdc, WE_FGC_HIGHLIGHT_ITEM));
|
||||
SetBkColor (hdc,
|
||||
GetWindowElementPixel (hWnd, WE_BGC_HIGHLIGHT_ITEM));
|
||||
GetWindowElementPixelEx (hWnd, hdc, WE_BGC_HIGHLIGHT_ITEM));
|
||||
TextOut (hdc, x, y, szText);
|
||||
|
||||
rc_clip.right = rcClient.right;
|
||||
rc_clip.left = prog;
|
||||
SelectClipRect (hdc, &rc_clip);
|
||||
SetTextColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_WINDOW));
|
||||
SetTextColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_FGC_WINDOW));
|
||||
SetBkColor (hdc, GetWindowBkColor (hWnd));
|
||||
TextOut (hdc, x, y, szText);
|
||||
}
|
||||
|
@ -280,7 +280,8 @@ static void composite_wallpaper_rect (CompositorCtxt* ctxt,
|
||||
}
|
||||
else {
|
||||
SetBrushColor (HDC_SCREEN_SYS,
|
||||
GetWindowElementPixel (HWND_DESKTOP, WE_BGC_DESKTOP));
|
||||
GetWindowElementPixelEx (HWND_DESKTOP, HDC_SCREEN_SYS,
|
||||
WE_BGC_DESKTOP));
|
||||
SelectClipRect (HDC_SCREEN_SYS, &ctxt->rc_screen);
|
||||
FillBox (HDC_SCREEN_SYS, dirty_rc->left, dirty_rc->top,
|
||||
RECTWP(dirty_rc), RECTHP(dirty_rc));
|
||||
@ -704,6 +705,7 @@ static void on_showing_win (CompositorCtxt* ctxt, MG_Layer* layer, int zidx)
|
||||
if (layer != mgTopmostLayer)
|
||||
return;
|
||||
|
||||
_DBG_PRINTF ("called: %d\n", zidx);
|
||||
rgn = mg_slice_new (CLIPRGN);
|
||||
InitClipRgn (rgn, &ctxt->cliprc_heap);
|
||||
ServerGetWinZNodeRegion (layer, zidx, RGN_OP_SET | RGN_OP_FLAG_ABS, rgn);
|
||||
@ -719,6 +721,7 @@ static void on_hiding_win (CompositorCtxt* ctxt, MG_Layer* layer, int zidx)
|
||||
if (layer != mgTopmostLayer)
|
||||
return;
|
||||
|
||||
_DBG_PRINTF ("called: %d\n", zidx);
|
||||
znode_hdr = ServerGetWinZNodeHeader (layer, zidx, (void**)&rgn, FALSE);
|
||||
assert (znode_hdr);
|
||||
|
||||
|
@ -3751,7 +3751,7 @@ def_paint_desktop (void* context, HDC dc_desktop, const RECT* inv_rc)
|
||||
}
|
||||
|
||||
SetBrushColor (dc_desktop,
|
||||
GetWindowElementPixel (HWND_DESKTOP, WE_BGC_DESKTOP));
|
||||
GetWindowElementPixelEx (HWND_DESKTOP, HDC_SCREEN, WE_BGC_DESKTOP));
|
||||
|
||||
if (inv_rc) {
|
||||
SelectClipRect (dc_desktop, inv_rc);
|
||||
|
@ -4059,20 +4059,20 @@ static void mTextEditor_beginSelection(mTextEditor *self, HDC hdc)
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
SetBkMode(hdc, BM_OPAQUE);
|
||||
SetBkMode (hdc, BM_OPAQUE);
|
||||
|
||||
SetTextColor (hdc,
|
||||
GetWindowElementPixel (self->hwnd,
|
||||
GetWindowElementPixelEx (self->hwnd, hdc,
|
||||
GetWindowStyle(self->hwnd)&WS_DISABLED?
|
||||
WE_FGC_DISABLED_ITEM : WE_FGC_SELECTED_ITEM));
|
||||
|
||||
if (TE_IS_FOCUS(self)) {
|
||||
SetBkColor (hdc,
|
||||
GetWindowElementPixel(self->hwnd, WE_BGC_SELECTED_ITEM));
|
||||
GetWindowElementPixelEx (self->hwnd, hdc, WE_BGC_SELECTED_ITEM));
|
||||
}
|
||||
else {
|
||||
SetBkColor (hdc,
|
||||
GetWindowElementPixel (self->hwnd, WE_BGC_SELECTED_LOSTFOCUS));
|
||||
GetWindowElementPixelEx (self->hwnd, hdc, WE_BGC_SELECTED_LOSTFOCUS));
|
||||
}
|
||||
}
|
||||
|
||||
@ -4083,7 +4083,7 @@ static void mTextEditor_setupDC(mTextEditor *self, HDC hdc)
|
||||
SetBkColor (hdc, GetWindowBkColor (self->hwnd));
|
||||
|
||||
SetTextColor (hdc,
|
||||
GetWindowElementPixel (self->hwnd,
|
||||
GetWindowElementPixelEx (self->hwnd, hdc,
|
||||
GetWindowStyle(self->hwnd)&WS_DISABLED?
|
||||
WE_FGC_DISABLED_ITEM : WE_FGC_WINDOW));
|
||||
}
|
||||
@ -4175,12 +4175,12 @@ static int mTextEditor_getInvalidBkgnd(mTextEditor *self, RECT *prc)
|
||||
|
||||
#define INIT_SELECT_BRUSH(self, hdc, oldColor) \
|
||||
if (TE_IS_FOCUS(self)) {\
|
||||
oldColor = SetBrushColor (hdc, GetWindowElementPixel(self->hwnd, \
|
||||
WE_BGC_SELECTED_ITEM)); \
|
||||
oldColor = SetBrushColor (hdc, GetWindowElementPixelEx(self->hwnd, \
|
||||
hdc, WE_BGC_SELECTED_ITEM)); \
|
||||
}\
|
||||
else {\
|
||||
oldColor = SetBrushColor (hdc, GetWindowElementPixel(self->hwnd, \
|
||||
WE_BGC_SELECTED_LOSTFOCUS));\
|
||||
oldColor = SetBrushColor (hdc, GetWindowElementPixelEx(self->hwnd, \
|
||||
hdc, WE_BGC_SELECTED_LOSTFOCUS));\
|
||||
}
|
||||
|
||||
#define INIT_NORMAL_BRUSH(self, hdc, oldColor) \
|
||||
@ -6795,7 +6795,8 @@ BOOL RegisterTextEditControl (void)
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = mTextEditCtrlProc;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user