mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-25 02:33:59 +08:00
use dwBkColor for compositing schema
This commit is contained in:
@@ -3,6 +3,7 @@ Version 4.1.0 (2019/01/22)
|
||||
This is a developing version, an unstable version.
|
||||
It needs the following packages:
|
||||
|
||||
- GVFB: `gvfb-1.2.4.tar.gz`
|
||||
- The resource package: `minigui-res-4.0.0.tar.gz`
|
||||
- The test cases package: `mg-tests-4.1.0.tar.gz`
|
||||
- The sample package: `mg-samples-4.1.0.tar.gz`
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ void OnModeDrawText (HDC hdc)
|
||||
rc3.left = 0; rc3.top = 361; rc3.right = 401; rc3.bottom = 451;
|
||||
rc4.left = 0; rc4.top = 461; rc4.right = 401; rc4.bottom = 551;
|
||||
|
||||
SetBkColor (hdc, COLOR_lightwhite);
|
||||
SetBkColor (hdc, DWORD2Pixel (hdc, COLOR_lightwhite));
|
||||
|
||||
Rectangle (hdc, rc1.left, rc1.top, rc1.right, rc1.bottom);
|
||||
Rectangle (hdc, rc2.left, rc2.top, rc2.right, rc2.bottom);
|
||||
|
||||
@@ -17,7 +17,7 @@ static LRESULT StepControlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM l
|
||||
info = (HELPWININFO*)GetWindowAdditionalData (hwnd);
|
||||
|
||||
/* Draw the step information. */
|
||||
......
|
||||
...
|
||||
|
||||
EndPaint (hwnd, hdc);
|
||||
break;
|
||||
@@ -43,8 +43,7 @@ static LRESULT StepControlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM l
|
||||
return DefaultControlProc (hwnd, message, wParam, lParam);
|
||||
}
|
||||
|
||||
|
||||
static BOOL RegisterStepControl ()
|
||||
static BOOL RegisterStepControl (void)
|
||||
{
|
||||
int result;
|
||||
WNDCLASS StepClass;
|
||||
@@ -52,13 +51,17 @@ static BOOL RegisterStepControl ()
|
||||
StepClass.spClassName = STEP_CTRL_NAME;
|
||||
StepClass.dwStyle = 0;
|
||||
StepClass.hCursor = GetSystemCursor (IDC_ARROW);
|
||||
StepClass.iBkColor = COLOR_lightwhite;
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
StepClass.dwBkRGBA = COLOR_lightwhite;
|
||||
#else
|
||||
StepClass.iBkColor = PIXEL_lightwhite;
|
||||
#endif
|
||||
StepClass.WinProc = StepControlProc;
|
||||
|
||||
return RegisterWindowClass (&StepClass);
|
||||
}
|
||||
|
||||
static void UnregisterStepControl ()
|
||||
static void UnregisterStepControl (void)
|
||||
{
|
||||
UnregisterWindowClass (STEP_CTRL_NAME);
|
||||
}
|
||||
|
||||
+1
-1
@@ -855,7 +855,7 @@ typedef UINT_PTR LPARAM;
|
||||
|
||||
/**
|
||||
* \var typedef DWORD32 RGBCOLOR
|
||||
* \brief A type definition for a RGB color.
|
||||
* \brief A type definition for a RGB color value.
|
||||
*/
|
||||
typedef DWORD32 RGBCOLOR;
|
||||
|
||||
|
||||
@@ -106,7 +106,11 @@ BOOL RegisterBIDISLEditControl (void)
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (IDC_IBEAM);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = SLEditCtrlProc;
|
||||
|
||||
if (AddNewControlClass (&WndClass) != ERR_OK)
|
||||
|
||||
@@ -666,8 +666,13 @@ BOOL RegisterButtonControl (void)
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (IDC_ARROW);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor =
|
||||
GetWindowElementAttr (HWND_NULL, WE_MAINC_THREED_BODY);
|
||||
#else
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixel (HWND_NULL, WE_MAINC_THREED_BODY);
|
||||
#endif
|
||||
WndClass.WinProc = ButtonCtrlProc;
|
||||
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
|
||||
@@ -93,8 +93,13 @@ BOOL RegisterComboBoxControl (void)
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (0);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor =
|
||||
GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = ComboBoxCtrlProc;
|
||||
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
|
||||
@@ -115,7 +115,11 @@ BOOL RegisterSLEditControl (void)
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (IDC_IBEAM);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = SLEditCtrlProc;
|
||||
|
||||
if (AddNewControlClass (&WndClass) != ERR_OK)
|
||||
|
||||
@@ -90,7 +90,11 @@ BOOL RegisterListboxControl (void)
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (0);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = ListboxCtrlProc;
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
}
|
||||
|
||||
@@ -87,8 +87,13 @@ BOOL RegisterMenuButtonControl (void)
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (IDC_ARROW);
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixel (HWND_NULL, WE_MAINC_THREED_BODY);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL,
|
||||
WE_MAINC_THREED_BODY);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL,
|
||||
WE_MAINC_THREED_BODY);
|
||||
#endif
|
||||
WndClass.WinProc = MenuButtonCtrlProc;
|
||||
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
|
||||
@@ -87,7 +87,11 @@ BOOL RegisterNewToolbarControl (void)
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (IDC_ARROW);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = NewToolbarCtrlProc;
|
||||
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
|
||||
@@ -223,8 +223,13 @@ BOOL RegisterProgressBarControl (void)
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (0);
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixel (HWND_NULL, WE_MAINC_THREED_BODY);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL,
|
||||
WE_MAINC_THREED_BODY);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL,
|
||||
WE_MAINC_THREED_BODY);
|
||||
#endif
|
||||
WndClass.WinProc = ProgressBarCtrlProc;
|
||||
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
|
||||
@@ -92,8 +92,13 @@ BOOL RegisterPropSheetControl (void)
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (0);
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixel (HWND_NULL, WE_MAINC_THREED_BODY);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL,
|
||||
WE_MAINC_THREED_BODY);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL,
|
||||
WE_MAINC_THREED_BODY);
|
||||
#endif
|
||||
WndClass.WinProc = PropSheetCtrlProc;
|
||||
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
|
||||
@@ -1257,8 +1257,11 @@ BOOL RegisterScrollBarControl (void)
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (0);
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = ScrollBarCtrlProc;
|
||||
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
|
||||
@@ -597,7 +597,11 @@ BOOL RegisterScrollViewControl (void)
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (IDC_ARROW);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = ScrollViewCtrlProc;
|
||||
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
|
||||
@@ -286,7 +286,11 @@ BOOL RegisterScrollWndControl (void)
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (IDC_ARROW);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = ScrollWndCtrlProc;
|
||||
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
@@ -358,7 +362,11 @@ static BOOL RegisterContainer (void)
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (IDC_ARROW);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = DefaultContainerProc;
|
||||
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
|
||||
+10
-4
@@ -92,13 +92,13 @@ StaticControlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
/* DK[01/11/10]: For bug 4336 */
|
||||
switch (pCtrl->dwStyle & SS_TYPEMASK) {
|
||||
case SS_GRAYRECT:
|
||||
pCtrl->iBkColor = PIXEL_lightgray;
|
||||
pCtrl->iBkColor = DWORD2PixelByWindow (hwnd, COLOR_lightgray);
|
||||
break;
|
||||
case SS_BLACKRECT:
|
||||
pCtrl->iBkColor = PIXEL_black;
|
||||
pCtrl->iBkColor = DWORD2PixelByWindow (hwnd, COLOR_black);
|
||||
break;
|
||||
case SS_WHITERECT:
|
||||
pCtrl->iBkColor = PIXEL_lightwhite;
|
||||
pCtrl->iBkColor = DWORD2PixelByWindow (hwnd, COLOR_lightwhite);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -350,7 +350,13 @@ BOOL RegisterStaticControl (void)
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (IDC_ARROW);
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL,WE_MAINC_THREED_BODY);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL,
|
||||
WE_MAINC_THREED_BODY);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL,
|
||||
WE_MAINC_THREED_BODY);
|
||||
#endif
|
||||
WndClass.WinProc = StaticControlProc;
|
||||
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
|
||||
@@ -3598,7 +3598,11 @@ BOOL RegisterTextEditControl (void)
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (IDC_IBEAM);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = TextEditCtrlProc;
|
||||
|
||||
if (AddNewControlClass (&WndClass) != ERR_OK)
|
||||
|
||||
@@ -542,7 +542,13 @@ BOOL RegisterTrackBarControl (void)
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (0);
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_DESKTOP, WE_MAINC_THREED_BODY);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL,
|
||||
WE_MAINC_THREED_BODY);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL,
|
||||
WE_MAINC_THREED_BODY);
|
||||
#endif
|
||||
WndClass.WinProc = TrackBarCtrlProc;
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,11 @@ BOOL RegisterAnimationControl (void)
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (IDC_ARROW);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = AnimationCtrlProc;
|
||||
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
|
||||
@@ -81,7 +81,13 @@ BOOL RegisterCoolBarControl (void)
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (IDC_ARROW);
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_DESKTOP, WE_MAINC_THREED_BODY);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL,
|
||||
WE_MAINC_THREED_BODY);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_DESKTOP,
|
||||
WE_MAINC_THREED_BODY);
|
||||
#endif
|
||||
WndClass.WinProc = CoolBarCtrlProc;
|
||||
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
|
||||
+10
-6
@@ -2525,12 +2525,16 @@ BOOL RegisterGridViewControl (void)
|
||||
{
|
||||
WNDCLASS WndClass;
|
||||
|
||||
WndClass.spClassName = CTRL_GRIDVIEW;
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (0);
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_DESKTOP, WE_BGC_WINDOW);
|
||||
WndClass.WinProc = GridViewCtrlProc;
|
||||
WndClass.spClassName = CTRL_GRIDVIEW;
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (0);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = GridViewCtrlProc;
|
||||
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
}
|
||||
|
||||
@@ -723,7 +723,11 @@ BOOL RegisterIconViewControl (void)
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (IDC_ARROW);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = IconViewCtrlProc;
|
||||
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
|
||||
+10
-6
@@ -2195,12 +2195,16 @@ BOOL RegisterListViewControl (void)
|
||||
{
|
||||
WNDCLASS WndClass;
|
||||
|
||||
WndClass.spClassName = CTRL_LISTVIEW;
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (0);
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
WndClass.WinProc = ListViewCtrlProc;
|
||||
WndClass.spClassName = CTRL_LISTVIEW;
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (0);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = ListViewCtrlProc;
|
||||
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
}
|
||||
|
||||
@@ -118,13 +118,16 @@ BOOL RegisterMonthCalendarControl (void)
|
||||
{
|
||||
WNDCLASS WndClass;
|
||||
|
||||
WndClass.spClassName = "monthcalendar";
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (IDC_ARROW);
|
||||
WndClass.iBkColor =
|
||||
GetWindowElementPixel (HWND_DESKTOP, WE_BGC_WINDOW);
|
||||
WndClass.WinProc = MonthCalendarCtrlProc;
|
||||
WndClass.spClassName = "monthcalendar";
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (IDC_ARROW);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_DESKTOP, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = MonthCalendarCtrlProc;
|
||||
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
}
|
||||
|
||||
@@ -411,7 +411,11 @@ BOOL RegisterSpinControl (void)
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (IDC_ARROW);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = SpinCtrlProc;
|
||||
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
|
||||
@@ -112,7 +112,11 @@ BOOL RegisterTreeViewControl (void)
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (0);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = TreeViewCtrlProc;
|
||||
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
|
||||
@@ -84,7 +84,11 @@ BOOL RegisterTreeViewRdrControl (void)
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (0);
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = TreeViewCtrlProc;
|
||||
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
|
||||
@@ -353,7 +353,11 @@ int gui_ControlClassDataOp (int Operation, PWNDCLASS pWndClass)
|
||||
if (pWndClass->opMask & COP_HCURSOR)
|
||||
pWndClass->hCursor = cci->hCursor;
|
||||
if (pWndClass->opMask & COP_BKCOLOR)
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
pWndClass->dwBkColor = cci->dwBkColor;
|
||||
#else
|
||||
pWndClass->iBkColor = cci->iBkColor;
|
||||
#endif
|
||||
if (pWndClass->opMask & COP_WINPROC)
|
||||
pWndClass->WinProc = cci->ControlProc;
|
||||
if (pWndClass->opMask & COP_ADDDATA)
|
||||
@@ -367,7 +371,11 @@ int gui_ControlClassDataOp (int Operation, PWNDCLASS pWndClass)
|
||||
if (pWndClass->opMask & COP_HCURSOR)
|
||||
cci->hCursor = pWndClass->hCursor;
|
||||
if (pWndClass->opMask & COP_BKCOLOR)
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
cci->dwBkColor = pWndClass->dwBkColor;
|
||||
#else
|
||||
cci->iBkColor = pWndClass->iBkColor;
|
||||
#endif
|
||||
if (pWndClass->opMask & COP_WINPROC)
|
||||
cci->ControlProc = pWndClass->WinProc;
|
||||
if (pWndClass->opMask & COP_ADDDATA)
|
||||
@@ -445,7 +453,11 @@ int AddNewControlClass (PWNDCLASS pWndClass)
|
||||
newcci->dwStyle = pWndClass->dwStyle;
|
||||
newcci->dwExStyle = pWndClass->dwExStyle;
|
||||
newcci->hCursor = pWndClass->hCursor;
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
newcci->dwBkColor = pWndClass->dwBkColor;
|
||||
#else
|
||||
newcci->iBkColor = pWndClass->iBkColor;
|
||||
#endif
|
||||
newcci->ControlProc = pWndClass->WinProc;
|
||||
newcci->dwAddData = pWndClass->dwAddData;
|
||||
newcci->nUseCount = 0;
|
||||
@@ -554,7 +566,11 @@ static void DumpCtrlClassInfo (PCTRLCLASSINFO cci)
|
||||
{
|
||||
printf ("\tClass Name: %s\n", cci->name);
|
||||
printf ("\tClass Cursor: %p\n", cci->hCursor);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
printf ("\tClass Background color: 0x%08X\n", (int)cci->dwBkColor);
|
||||
#else
|
||||
printf ("\tClass Background color: %d\n", cci->iBkColor);
|
||||
#endif
|
||||
printf ("\tClass Control Proc: %p\n", cci->ControlProc);
|
||||
printf ("\tClass Use Count: %d\n", cci->nUseCount);
|
||||
}
|
||||
|
||||
@@ -66,8 +66,12 @@ typedef struct _CTRLCLASSINFO
|
||||
|
||||
HCURSOR hCursor; // control cursor
|
||||
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
DWORD dwBkColor; // control background color.
|
||||
#else
|
||||
gal_pixel iFgColor; // control foreground color.
|
||||
gal_pixel iBkColor; // control background color.
|
||||
#endif
|
||||
|
||||
LRESULT (*ControlProc)(HWND, UINT, WPARAM, LPARAM);
|
||||
// control procedure.
|
||||
|
||||
@@ -539,7 +539,7 @@ static void on_dirty_wpp (CompositorCtxt* ctxt)
|
||||
{
|
||||
const ZNODEHEADER* znode_hdr;
|
||||
|
||||
_DBG_PRINTF ("called\n");
|
||||
//_DBG_PRINTF ("called\n");
|
||||
znode_hdr = ServerGetWinZNodeHeader (NULL, 0, NULL, TRUE);
|
||||
assert (znode_hdr);
|
||||
|
||||
|
||||
@@ -6792,9 +6792,14 @@ BOOL RegisterTextEditControl (void)
|
||||
WndClass.dwStyle = WS_NONE;
|
||||
WndClass.dwExStyle = WS_EX_NONE;
|
||||
WndClass.hCursor = GetSystemCursor (IDC_IBEAM);
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
|
||||
#else
|
||||
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
|
||||
#endif
|
||||
WndClass.WinProc = mTextEditCtrlProc;
|
||||
|
||||
|
||||
init_textedit();
|
||||
|
||||
if (AddNewControlClass (&WndClass) != ERR_OK)
|
||||
|
||||
Reference in New Issue
Block a user