TOOLBARCLASSNAME,
szRunningApps,
WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN |
- TBSTYLE_TOOLTIPS | TBSTYLE_WRAPABLE | TBSTYLE_LIST |
- TBSTYLE_TRANSPARENT |
- CCS_TOP | CCS_NORESIZE | CCS_NODIVIDER,
+ TBSTYLE_TOOLTIPS | TBSTYLE_WRAPABLE | TBSTYLE_LIST | TBSTYLE_TRANSPARENT |
+ CCS_TOP | CCS_NORESIZE | CCS_NODIVIDER,
0,
0,
0,
if (uMsg != WM_NCCREATE)
{
- This = (PTASK_SWITCH_WND)GetWindowLongPtr(hwnd,
- 0);
+ This = (PTASK_SWITCH_WND)GetWindowLongPtr(hwnd, 0);
}
if (This != NULL || uMsg == WM_NCCREATE)
TaskSwitchWnd_UpdateTheme(This);
break;
case WM_ERASEBKGND:
- TaskSwitchWnd_DrawBackground(hwnd, (HDC)wParam);
- break;
+ if (!This->TaskBandTheme)
+ break;
+ TaskSwitchWnd_DrawBackground(hwnd, (HDC) wParam);
+ return TRUE;
case WM_SIZE:
{
SIZE szClient;
szClient.cy,
SWP_NOZORDER);
- TaskSwitchWnd_UpdateButtonsSize(This,
- FALSE);
+ TaskSwitchWnd_UpdateButtonsSize(This, FALSE);
}
break;
}
{
/* We want the tray window to be draggable everywhere, so make the control
appear transparent */
- Ret = DefWindowProc(hwnd,
- uMsg,
- wParam,
- lParam);
+ Ret = DefWindowProc(hwnd, uMsg, wParam, lParam);
if (Ret != HTVSCROLL && Ret != HTHSCROLL)
- Ret = HTTRANSPARENT;
- break;
+ return HTTRANSPARENT;
+ return Ret;
}
case WM_COMMAND:
{
if (lParam != 0 && (HWND)lParam == This->hWndToolbar)
{
- TaskSwitchWnd_HandleButtonClick(This,
- LOWORD(wParam));
+ TaskSwitchWnd_HandleButtonClick(This, LOWORD(wParam));
}
break;
}
if (nmh->hwndFrom == This->hWndToolbar)
{
- Ret = TaskSwitchWnd_HandleToolbarNotification(This,
- nmh);
+ return TaskSwitchWnd_HandleToolbarNotification(This, nmh);
}
- break;
+ return 0;
}
case TSWM_ENABLEGROUPING:
TaskSwitchWnd_EnableGrouping(This,
(BOOL)wParam);
}
- break;
+ return Ret;
}
case TSWM_UPDATETASKBARPOS:
{
/* Update the button spacing */
- TaskSwitchWnd_UpdateTbButtonSpacing(This,
- ITrayWindow_IsHorizontal(This->Tray),
- 0,
- 0);
+ TaskSwitchWnd_UpdateTbButtonSpacing(This, ITrayWindow_IsHorizontal(This->Tray), 0, 0);
break;
}
pt.x = (LONG)LOWORD(lParam);
pt.y = (LONG)HIWORD(lParam);
- MapWindowPoints(NULL,
- This->hWndToolbar,
- &pt,
- 1);
+ MapWindowPoints(NULL, This->hWndToolbar, &pt, 1);
- iBtn = (INT_PTR)SendMessage(This->hWndToolbar,
- TB_HITTEST,
- 0,
- (LPARAM)&pt);
+ iBtn = (INT_PTR) SendMessage(This->hWndToolbar, TB_HITTEST, 0, (LPARAM) &pt);
if (iBtn >= 0)
{
- TaskSwitchWnd_HandleButtonRightClick(This,
- iBtn);
+ TaskSwitchWnd_HandleButtonRightClick(This, iBtn);
}
else
goto ForwardContextMenuMsg;
{
ForwardContextMenuMsg:
/* Forward message */
- Ret = SendMessage(ITrayWindow_GetHWND(This->Tray),
- uMsg,
- wParam,
- lParam);
+ Ret = SendMessage(ITrayWindow_GetHWND(This->Tray), uMsg, wParam, lParam);
}
break;
}
TaskSwitchWnd_Create(This);
#if DUMP_TASKS != 0
- SetTimer(hwnd,
- 1,
- 5000,
- NULL);
+ SetTimer(hwnd, 1, 5000, NULL);
#endif
break;
case WM_NCDESTROY:
TaskSwitchWnd_NCDestroy(This);
- HeapFree(hProcessHeap,
- 0,
- This);
- SetWindowLongPtr(hwnd,
- 0,
- 0);
+ HeapFree(hProcessHeap, 0, This);
+ SetWindowLongPtr(hwnd, 0, 0);
break;
#if DUMP_TASKS != 0
if (uMsg == This->ShellHookMsg && This->ShellHookMsg != 0)
{
/* Process shell messages */
- Ret = (LRESULT)TaskSwitchWnd_HandleShellHookMsg(This,
- wParam,
- lParam);
- break;
+ return (LRESULT) TaskSwitchWnd_HandleShellHookMsg(This, wParam, lParam);
}
- Ret = DefWindowProc(hwnd,
- uMsg,
- wParam,
- lParam);
break;
}
}
- else
- {
- Ret = DefWindowProc(hwnd,
- uMsg,
- wParam,
- lParam);
- }
- return Ret;
+ return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
{
HWND parent = GetParent(hWnd);
- if (!parent)
- return 0;
-
- SendMessage(parent, msg, wParam, lParam);
+ if (parent)
+ {
+ SendMessage(parent, msg, wParam, lParam);
+ }
}
return DefSubclassProc(hWnd, msg, wParam, lParam);
switch (uMsg)
{
case WM_ERASEBKGND:
- SysPagerWnd_DrawBackground(hwnd,(HDC)wParam);
- return 0;
+ if (!IsAppThemed())
+ break;
+
+ SysPagerWnd_DrawBackground(hwnd, (HDC) wParam);
+ return TRUE;
case WM_NCCREATE:
{
This->ButtonCount = 0;
This->VisibleButtonCount = 0;
- SetWindowLongPtr(hwnd,
- 0,
- (LONG_PTR)This);
+ SetWindowLongPtr(hwnd, 0, (LONG_PTR) This);
return TRUE;
}
szClient.cx = LOWORD(lParam);
szClient.cy = HIWORD(lParam);
- Ret = DefWindowProc(hwnd,
- uMsg,
- wParam,
- lParam);
-
+ Ret = DefWindowProc(hwnd, uMsg, wParam, lParam);
if (This->hWndToolbar != NULL && This->hWndToolbar != hwnd)
{
- SetWindowPos(This->hWndToolbar,
- NULL,
- 0,
- 0,
- szClient.cx,
- szClient.cy,
- SWP_NOZORDER);
+ SetWindowPos(This->hWndToolbar, NULL, 0, 0, szClient.cx, szClient.cy, SWP_NOZORDER);
}
+
+ return Ret;
}
default:
return 0;
}
- Ret = DefWindowProc(hwnd,
- uMsg,
- wParam,
- lParam);
break;
}
}
- return Ret;
+ return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
static HWND
TrayClockWnd_UpdateTheme(This);
break;
case WM_ERASEBKGND:
- TrayClockWnd_DrawBackground(hwnd, (HDC)wParam);
- break;
+ if (!IsAppThemed())
+ break;
+
+ TrayClockWnd_DrawBackground(hwnd, (HDC) wParam);
+ return TRUE;
case WM_PAINT:
case WM_PRINTCLIENT:
{
if (wParam == 0)
{
- hDC = BeginPaint(This->hWnd,
- &ps);
+ hDC = BeginPaint(This->hWnd, &ps);
}
if (hDC != NULL)
{
- TrayClockWnd_Paint(This,
- hDC);
+ TrayClockWnd_Paint(This, hDC);
if (wParam == 0)
{
- EndPaint(This->hWnd,
- &ps);
+ EndPaint(This->hWnd, &ps);
}
}
break;
case WM_NCHITTEST:
/* We want the user to be able to drag the task bar when clicking the clock */
- Ret = HTTRANSPARENT;
- break;
+ return HTTRANSPARENT;
case TCWM_GETMINIMUMSIZE:
{
This->IsHorizontal = (BOOL)wParam;
- Ret = (LRESULT)TrayClockWnd_GetMinimumSize(This,
- (BOOL)wParam,
- (PSIZE)lParam) != 0;
- break;
+ return (LRESULT) TrayClockWnd_GetMinimumSize(This, (BOOL) wParam, (PSIZE) lParam) != 0;
}
case TCWM_UPDATETIME:
{
- Ret = (LRESULT)TrayClockWnd_ResetTime(This);
- break;
+ return (LRESULT)TrayClockWnd_ResetTime(This);
}
case WM_NCCREATE:
This->hWnd = hwnd;
This->hWndNotify = CreateStruct->hwndParent;
- SetWindowLongPtr(hwnd,
- 0,
- (LONG_PTR)This);
+ SetWindowLongPtr(hwnd, 0, (LONG_PTR) This);
TrayClockWnd_UpdateTheme(This);
return TRUE;
TRUE);
break;
}
-
- default:
- Ret = DefWindowProc(hwnd,
- uMsg,
- wParam,
- lParam);
- break;
}
}
- return Ret;
+ return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
static HWND
IN LPARAM lParam)
{
PTRAY_NOTIFY_WND_DATA This = NULL;
- LRESULT Ret = FALSE;
if (uMsg != WM_NCCREATE)
{
return 0;
case WM_ERASEBKGND:
if (!This->TrayTheme)
- goto HandleDefaultMessage;
- return TrayNotifyWnd_DrawBackground(hwnd,
- uMsg,
- wParam,
- lParam);
+ break;
+ return TrayNotifyWnd_DrawBackground(hwnd, uMsg, wParam, lParam);
case TNWM_GETMINIMUMSIZE:
{
- Ret = (LRESULT)TrayNotifyWnd_GetMinimumSize(This,
- (BOOL)wParam,
- (PSIZE)lParam);
- break;
+ return (LRESULT) TrayNotifyWnd_GetMinimumSize(This, (BOOL) wParam, (PSIZE) lParam);
}
case TNWM_UPDATETIME:
if (This->hWndTrayClock != NULL)
{
/* Forward the message to the tray clock window procedure */
- Ret = TrayClockWndProc(This->hWndTrayClock,
- TCWM_UPDATETIME,
- wParam,
- lParam);
+ return TrayClockWndProc(This->hWndTrayClock, TCWM_UPDATETIME, wParam, lParam);
}
- break;
+ return 0;
}
case WM_SIZE:
TrayNotifyWnd_Size(This,
&szClient);
- break;
+ return 0;
}
case WM_NCHITTEST:
/* We want the user to be able to drag the task bar when clicking the
tray notification window */
- Ret = HTTRANSPARENT;
- break;
-
+ return HTTRANSPARENT;
case TNWM_SHOWCLOCK:
{
BOOL PrevHidden = This->HideClock;
This->HideClock ? SW_HIDE : SW_SHOW);
}
- Ret = (LRESULT)(!PrevHidden);
- break;
+ return (LRESULT) (!PrevHidden);
}
case WM_NOTIFY:
if (nmh->hwndFrom == This->hWndTrayClock)
{
/* Pass down notifications */
- Ret = SendMessage(This->hWndNotify,
- WM_NOTIFY,
- wParam,
- lParam);
+ return SendMessage(This->hWndNotify, WM_NOTIFY, wParam, lParam);
}
- break;
+ return 0;
}
case WM_SETFONT:
wParam,
lParam);
}
- goto HandleDefaultMessage;
+ break;
}
case WM_NCCREATE:
This->hWnd = hwnd;
This->hWndNotify = CreateStruct->hwndParent;
- SetWindowLongPtr(hwnd,
- 0,
- (LONG_PTR)This);
+ SetWindowLongPtr(hwnd, 0, (LONG_PTR) This);
return TRUE;
}
case WM_CREATE:
TrayNotifyWnd_Create(This);
- break;
+ return 0;
case WM_NCDESTROY:
TrayNotifyWnd_NCDestroy(This);
- break;
-
- default:
-HandleDefaultMessage:
- Ret = DefWindowProc(hwnd,
- uMsg,
- wParam,
- lParam);
- break;
+ return 0;
}
}
- return Ret;
+ return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
HWND