BOOL RegisterCoolBarControl (void) { WNDCLASS WndClass; WndClass.spClassName = CTRL_COOLBAR; WndClass.dwStyle = WS_NONE; WndClass.dwExStyle = WS_EX_NONE; WndClass.hCursor = GetSystemCursor (IDC_ARROW); WndClass.iBkColor = GetWindowElementPixel (HWND_DESKTOP, WE_MAINC_THREED_BODY); WndClass.WinProc = CoolBarCtrlProc; return AddNewControlClass (&WndClass) == ERR_OK; }
static BOOL RegisterContainer (void) { WNDCLASS WndClass; WndClass.spClassName = CTRL_CONTAINER; WndClass.dwStyle = WS_NONE; WndClass.dwExStyle = WS_EX_NONE; WndClass.hCursor = GetSystemCursor (IDC_ARROW); WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW); WndClass.WinProc = DefaultContainerProc; return AddNewControlClass (&WndClass) == ERR_OK; }
BOOL RegisterProgressBarControl (void) { WNDCLASS WndClass; WndClass.spClassName = CTRL_PROGRESSBAR; WndClass.dwStyle = WS_NONE; WndClass.dwExStyle = WS_EX_NONE; WndClass.hCursor = GetSystemCursor (0); WndClass.iBkColor = GetWindowElementColor (BKC_CONTROL_DEF); WndClass.WinProc = ProgressBarCtrlProc; return AddNewControlClass (&WndClass) == ERR_OK; }
BOOL RegisterPropSheetControl (void) { WNDCLASS WndClass; WndClass.spClassName = CTRL_PROPSHEET; WndClass.dwStyle = WS_NONE; WndClass.dwExStyle = WS_EX_NONE; WndClass.hCursor = GetSystemCursor (0); WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_MAINC_THREED_BODY); WndClass.WinProc = PropSheetCtrlProc; return AddNewControlClass (&WndClass) == ERR_OK; }
BOOL RegisterScrollWndControl (void) { WNDCLASS WndClass; if (!RegisterContainer ()) return FALSE; WndClass.spClassName = CTRL_SCROLLWND; WndClass.dwStyle = WS_NONE; WndClass.dwExStyle = WS_EX_NONE; WndClass.hCursor = GetSystemCursor (IDC_ARROW); WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW); WndClass.WinProc = ScrollWndCtrlProc; return AddNewControlClass (&WndClass) == ERR_OK; }
BOOL RegisterButtonControl (void) { WNDCLASS WndClass; if (!LoadSystemBitmap (&bmp_button, SYSBMP_BUTTON)) return FALSE; WndClass.spClassName = CTRL_BUTTON; WndClass.dwStyle = WS_NONE; WndClass.dwExStyle = WS_EX_NONE; WndClass.hCursor = GetSystemCursor (IDC_ARROW); WndClass.iBkColor = GetWindowElementColor (BKC_CONTROL_DEF); WndClass.WinProc = ButtonCtrlProc; return AddNewControlClass (&WndClass) == ERR_OK; }
BOOL RegisterButtonControl (void) { WNDCLASS WndClass; #ifdef _PHONE_WINDOW_STYLE if ((bmp_button = GetStockBitmap (STOCKBMP_BUTTON, 0, 0)) == NULL) { printf("GetStockBitmap failure! STOCKBMP_BUTTON\n"); return FALSE; } #else if ((bmp_button = GetStockBitmap (STOCKBMP_BUTTON, -1, -1)) == NULL) return FALSE; #endif WndClass.spClassName = CTRL_BUTTON; WndClass.dwStyle = WS_NONE; WndClass.dwExStyle = WS_EX_NONE; WndClass.hCursor = GetSystemCursor (IDC_ARROW); WndClass.iBkColor = GetWindowElementColor (BKC_CONTROL_DEF); WndClass.WinProc = ButtonCtrlProc; return AddNewControlClass (&WndClass) == ERR_OK; }