HBITMAP hTaskbarBitmap;
HBITMAP hTrayBitmap;
+ HBITMAP hStartBitmap;
} PROPSHEET_INFO, *PPROPSHEET_INFO;
static BOOL
-UpdateTaskbarBitmap(PPROPSHEET_INFO pPropInfo)
+UpdateBitmaps(PPROPSHEET_INFO pPropInfo)
{
- HWND hwndLock, hwndHide, hwndGroup, hwndShowQL, hwndClock, hwndSeconds, hwndHideInactive;
- HWND hwndTaskbarBitmap, hwndTrayBitmap;
- HWND hwndAdvancedButton;
+ HWND hwndLock, hwndHide, hwndGroup, hwndShowQL, hwndClock, hwndSeconds, hwndHideInactive, hwndModernStart, hwndClassicStart;
+ HWND hwndTaskbarBitmap, hwndTrayBitmap, hwndStartBitmap;
+ HWND hwndCustomizeNotifyButton, hwndCustomizeClassicStartButton, hwndCustomizeModernStartButton;
BOOL bLock, bHide, bGroup, bShowQL, bShowClock, bShowSeconds, bHideInactive;
- LPTSTR lpTaskBarImageName = NULL, lpTrayImageName = NULL;
+ LPTSTR lpTaskBarImageName = NULL, lpTrayImageName = NULL, lpStartImageName = NULL;
BOOL bRet = FALSE;
hwndLock = GetDlgItem(pPropInfo->hTaskbarWnd, IDC_TASKBARPROP_LOCK);
hwndSeconds = GetDlgItem(pPropInfo->hTaskbarWnd, IDC_TASKBARPROP_SECONDS);
hwndHideInactive = GetDlgItem(pPropInfo->hTaskbarWnd, IDC_TASKBARPROP_HIDEICONS);
- hwndAdvancedButton = GetDlgItem(pPropInfo->hTaskbarWnd, IDC_TASKBARPROP_ICONCUST);
+ hwndCustomizeNotifyButton = GetDlgItem(pPropInfo->hTaskbarWnd, IDC_TASKBARPROP_ICONCUST);
+
+ hwndModernStart = GetDlgItem(pPropInfo->hStartWnd, IDC_TASKBARPROP_STARTMENU);
+ hwndClassicStart = GetDlgItem(pPropInfo->hStartWnd, IDC_TASKBARPROP_STARTMENUCLASSIC);
+
+ hwndCustomizeClassicStartButton = GetDlgItem(pPropInfo->hTaskbarWnd, IDC_TASKBARPROP_STARTMENUCLASSICCUST);
+ hwndCustomizeModernStartButton = GetDlgItem(pPropInfo->hTaskbarWnd, IDC_TASKBARPROP_STARTMENUCUST);
+
+
if (hwndLock && hwndHide && hwndGroup && hwndShowQL && hwndClock && hwndSeconds && hwndHideInactive)
{
if (bHideInactive)
{
- EnableWindow(hwndAdvancedButton, TRUE);
+ EnableWindow(hwndCustomizeNotifyButton, TRUE);
if (bShowClock)
{
EnableWindow(hwndSeconds, TRUE);
}
else
{
- EnableWindow(hwndAdvancedButton, FALSE);
+ EnableWindow(hwndCustomizeNotifyButton, FALSE);
if (bShowClock)
{
EnableWindow(hwndSeconds, TRUE);
}
}
}
+
+ if(hwndClassicStart && hwndModernStart)
+ {
+ if(SendMessage(hwndModernStart, BM_GETCHECK, 0, 0) == BST_CHECKED)
+ {
+ EnableWindow(hwndCustomizeModernStartButton, TRUE);
+ EnableWindow(hwndCustomizeClassicStartButton, FALSE);
+ lpStartImageName = MAKEINTRESOURCEW(IDB_STARTPREVIEW);
+ }
+ else
+ {
+ EnableWindow(hwndCustomizeModernStartButton, FALSE);
+ EnableWindow(hwndCustomizeClassicStartButton, TRUE);
+ lpStartImageName = MAKEINTRESOURCEW(IDB_STARTPREVIEW_CLASSIC);
+ }
+
+ if (lpStartImageName)
+ {
+ if (pPropInfo->hStartBitmap)
+ {
+ DeleteObject(pPropInfo->hStartBitmap);
+ }
+
+ pPropInfo->hStartBitmap = (HBITMAP)LoadImageW(hExplorerInstance,
+ lpStartImageName,
+ IMAGE_BITMAP,
+ 0,
+ 0,
+ LR_DEFAULTCOLOR);
+ if (pPropInfo->hStartBitmap)
+ {
+ hwndStartBitmap = GetDlgItem(pPropInfo->hStartWnd,
+ IDC_TASKBARPROP_STARTMENU_BITMAP);
+ if (hwndStartBitmap)
+ {
+ SendMessage(hwndStartBitmap,
+ STM_SETIMAGE,
+ IMAGE_BITMAP,
+ (LPARAM)pPropInfo->hStartBitmap);
+ }
+ }
+ }
+ }
return bRet;
}
pPropInfo->hTaskbarWnd = hwnd;
- // FIXME: check buttons
- CheckDlgButton(hwnd, IDC_TASKBARPROP_SECONDS, AdvancedSettings.bShowSeconds ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwnd, IDC_TASKBARPROP_LOCK, TaskBarSettings.bLock ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwnd, IDC_TASKBARPROP_HIDE, TaskBarSettings.bAutoHide ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwnd, IDC_TASKBARPROP_ONTOP, TaskBarSettings.bAlwaysOnTop ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwnd, IDC_TASKBARPROP_GROUP, TaskBarSettings.bGroupButtons ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwnd, IDC_TASKBARPROP_SHOWQL, TaskBarSettings.bShowQuickLaunch ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwnd, IDC_TASKBARPROP_CLOCK, TaskBarSettings.bShowClock ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwnd, IDC_TASKBARPROP_SECONDS, TaskBarSettings.bShowSeconds ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwnd, IDC_TASKBARPROP_HIDEICONS, TaskBarSettings.bHideInactiveIcons ? BST_CHECKED : BST_UNCHECKED);
+
+ UpdateBitmaps(pPropInfo);
+}
+
+static VOID
+OnCreateStartPage(HWND hwnd,
+ PPROPSHEET_INFO pPropInfo)
+{
+ pPropInfo->hStartWnd = hwnd;
- UpdateTaskbarBitmap(pPropInfo);
+ CheckDlgButton(hwnd, IDC_TASKBARPROP_STARTMENUCLASSIC, 1); // HACK: This has to be read from registry!
+
+ UpdateBitmaps(pPropInfo);
}
INT_PTR CALLBACK
case IDC_TASKBARPROP_SECONDS:
if (HIWORD(wParam) == BN_CLICKED)
{
- UpdateTaskbarBitmap(pPropInfo);
+ UpdateBitmaps(pPropInfo);
/* Enable the 'Apply' button */
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
break;
case PSN_APPLY:
- AdvancedSettings.bShowSeconds = IsDlgButtonChecked(hwndDlg, IDC_TASKBARPROP_SECONDS);
- SaveSettingDword(szAdvancedSettingsKey, TEXT("ShowSeconds"), AdvancedSettings.bShowSeconds);
+ TaskBarSettings.bShowSeconds = IsDlgButtonChecked(hwndDlg, IDC_TASKBARPROP_SECONDS);
+ SaveTaskBarSettings();
break;
}
switch (uMsg)
{
case WM_INITDIALOG:
+ OnCreateStartPage(hwndDlg, (PPROPSHEET_INFO)((LPPROPSHEETPAGE)lParam)->lParam);
break;
case WM_COMMAND: