Author: ekohl
Date: Sun Mar 4 21:41:47 2007
New Revision: 25982
URL:
http://svn.reactos.org/svn/reactos?rev=25982&view=rev
Log:
- Show disables and selected menu items.
- User the caption font to display the window text.
Modified:
trunk/reactos/dll/cpl/desk/preview.c
Modified: trunk/reactos/dll/cpl/desk/preview.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/preview.c?rev…
==============================================================================
--- trunk/reactos/dll/cpl/desk/preview.c (original)
+++ trunk/reactos/dll/cpl/desk/preview.c Sun Mar 4 21:41:47 2007
@@ -186,14 +186,13 @@
/* Load and modify the menu */
pPreviewData->hMenu = LoadMenu(hApplet, MAKEINTRESOURCE(IDR_PREVIEW_MENU));
- EnableMenuItem(pPreviewData->hMenu, ID_MENU_DISABLED,
- MF_BYCOMMAND | MF_DISABLED);
+ EnableMenuItem(pPreviewData->hMenu,
+ 1, MF_BYPOSITION | MF_GRAYED);
HiliteMenuItem(hwnd, pPreviewData->hMenu,
- ID_MENU_SELECTED, MF_BYCOMMAND | MF_HILITE);
+ 2, MF_BYPOSITION | MF_HILITE);
// GetMenuItemRect(hwnd, pPreviewData->hMenu,
-// ID_MENU_SELECTED, &pPreviewData->rcSelectedMenuItem);
-
+// 2, &pPreviewData->rcSelectedMenuItem);
AllocAndLoadString(&pPreviewData->lpInAct, hApplet, IDS_INACTWIN);
AllocAndLoadString(&pPreviewData->lpAct, hApplet, IDS_ACTWIN);
@@ -382,7 +381,7 @@
rc.left += 4;
rc.top += 2;
SetTextColor(hdc, pPreviewData->clrWindowText);
- hOldFont = SelectObject(hdc, pPreviewData->hMessageFont);
+ hOldFont = SelectObject(hdc, pPreviewData->hCaptionFont);
DrawText(hdc, pPreviewData->lpWinTxt, lstrlen(pPreviewData->lpWinTxt), &rc,
DT_LEFT);
SelectObject(hdc, hOldFont);
@@ -444,11 +443,11 @@
if (PtInRect(&pPreviewData->rcActiveCaptionButtons, pt))
type = IDX_CAPTION_BUTTON;
+// if (PtInRect(&pPreviewData->rcSelectedMenuItem, pt))
+// type = IDX_SELECTION;
+
if (PtInRect(&pPreviewData->rcActiveMenuBar, pt))
type = IDX_MENU;
-
-// if (PtInRect(&pPreviewData->rcSelectedMenuItem, pt))
-// type = IDX_SELECTION;
if (PtInRect(&pPreviewData->rcActiveClient, pt))
type = IDX_WINDOW;