Index: base/shell/explorer/taskbar/desktopbar.cpp =================================================================== --- base/shell/explorer/taskbar/desktopbar.cpp (revision 59798) +++ base/shell/explorer/taskbar/desktopbar.cpp (working copy) @@ -87,13 +87,17 @@ LRESULT DesktopBar::Init(LPCREATESTRUCT pcs) { + //Create a bold font to use with the start button + HFONT hFont = CreateFont(11,0,0,0,FW_BOLD,FALSE,FALSE,FALSE,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS, + CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY, DEFAULT_PITCH,TEXT("Tahoma")); + if (super::Init(pcs)) return 1; // create start button ResString start_str(IDS_START); WindowCanvas canvas(_hwnd); - FontSelection font(canvas, GetStockFont(ANSI_VAR_FONT)); + FontSelection font(canvas, hFont); RECT rect = {0, 0}; DrawText(canvas, start_str, -1, &rect, DT_SINGLELINE|DT_CALCRECT); int start_btn_width = rect.right+16+8; @@ -102,7 +106,7 @@ // create "Start" button HWND hwndStart = Button(_hwnd, start_str, 1, 1, start_btn_width, REBARBAND_HEIGHT, IDC_START, WS_VISIBLE|WS_CHILD|BS_OWNERDRAW); - SetWindowFont(hwndStart, GetStockFont(ANSI_VAR_FONT), FALSE); + SetWindowFont(hwndStart, hFont, FALSE); new StartButton(hwndStart); /* Save the handle to the window, needed for push-state handling */ @@ -179,6 +183,38 @@ { } +void StartButton::DrawItem(LPDRAWITEMSTRUCT dis) +{ + UINT state = DFCS_BUTTONPUSH; + POINT imagePos; + RECT textRect; + int dt_flags; + + imagePos.x = dis->rcItem.left + 2; + imagePos.y = dis->rcItem.top + 2; + textRect.left = dis->rcItem.left + _cx + 4; + textRect.top = dis->rcItem.top + 2; + textRect.right = dis->rcItem.right - 4; + textRect.bottom = dis->rcItem.bottom - 4; + dt_flags = DT_SINGLELINE|DT_VCENTER; + + if (dis->itemState & ODS_SELECTED) { + state |= DFCS_PUSHED; + ++imagePos.x; ++imagePos.y; + ++textRect.left; ++textRect.top; + ++textRect.right; ++textRect.bottom; + } + + DrawFrameControl(dis->hDC, &dis->rcItem, DFC_BUTTON, state); + DrawIconEx(dis->hDC, imagePos.x, imagePos.y, _hIcon, _cx, _cy, 0, _hBrush, DI_NORMAL); + + TCHAR title[BUFFER_LEN]; + GetWindowText(_hwnd, title, BUFFER_LEN); + BkMode bk_mode(dis->hDC, TRANSPARENT); + TextColor lcColor(dis->hDC, GetSysColor(COLOR_BTNTEXT)); + DrawText(dis->hDC, title, -1, &textRect, dt_flags); +} + LRESULT StartButton::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) { switch(nmsg) { Index: base/shell/explorer/taskbar/desktopbar.h =================================================================== --- base/shell/explorer/taskbar/desktopbar.h (revision 59798) +++ base/shell/explorer/taskbar/desktopbar.h (working copy) @@ -137,4 +137,5 @@ protected: LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam); -}; + void DrawItem(LPDRAWITEMSTRUCT dis); +}; \ No newline at end of file