mirror of
https://github.com/reactos/reactos.git
synced 2024-09-11 05:12:43 +00:00
- Show disables and selected menu items.
- User the caption font to display the window text. svn path=/trunk/; revision=25982
This commit is contained in:
parent
78674981d1
commit
2f8a2c2ac1
|
@ -186,14 +186,13 @@ OnCreate(HWND hwnd, PPREVIEW_DATA pPreviewData)
|
||||||
|
|
||||||
/* Load and modify the menu */
|
/* Load and modify the menu */
|
||||||
pPreviewData->hMenu = LoadMenu(hApplet, MAKEINTRESOURCE(IDR_PREVIEW_MENU));
|
pPreviewData->hMenu = LoadMenu(hApplet, MAKEINTRESOURCE(IDR_PREVIEW_MENU));
|
||||||
EnableMenuItem(pPreviewData->hMenu, ID_MENU_DISABLED,
|
EnableMenuItem(pPreviewData->hMenu,
|
||||||
MF_BYCOMMAND | MF_DISABLED);
|
1, MF_BYPOSITION | MF_GRAYED);
|
||||||
HiliteMenuItem(hwnd, pPreviewData->hMenu,
|
HiliteMenuItem(hwnd, pPreviewData->hMenu,
|
||||||
ID_MENU_SELECTED, MF_BYCOMMAND | MF_HILITE);
|
2, MF_BYPOSITION | MF_HILITE);
|
||||||
|
|
||||||
// GetMenuItemRect(hwnd, pPreviewData->hMenu,
|
// GetMenuItemRect(hwnd, pPreviewData->hMenu,
|
||||||
// ID_MENU_SELECTED, &pPreviewData->rcSelectedMenuItem);
|
// 2, &pPreviewData->rcSelectedMenuItem);
|
||||||
|
|
||||||
|
|
||||||
AllocAndLoadString(&pPreviewData->lpInAct, hApplet, IDS_INACTWIN);
|
AllocAndLoadString(&pPreviewData->lpInAct, hApplet, IDS_INACTWIN);
|
||||||
AllocAndLoadString(&pPreviewData->lpAct, hApplet, IDS_ACTWIN);
|
AllocAndLoadString(&pPreviewData->lpAct, hApplet, IDS_ACTWIN);
|
||||||
|
@ -382,7 +381,7 @@ OnPaint(HWND hwnd, PPREVIEW_DATA pPreviewData)
|
||||||
rc.left += 4;
|
rc.left += 4;
|
||||||
rc.top += 2;
|
rc.top += 2;
|
||||||
SetTextColor(hdc, pPreviewData->clrWindowText);
|
SetTextColor(hdc, pPreviewData->clrWindowText);
|
||||||
hOldFont = SelectObject(hdc, pPreviewData->hMessageFont);
|
hOldFont = SelectObject(hdc, pPreviewData->hCaptionFont);
|
||||||
DrawText(hdc, pPreviewData->lpWinTxt, lstrlen(pPreviewData->lpWinTxt), &rc, DT_LEFT);
|
DrawText(hdc, pPreviewData->lpWinTxt, lstrlen(pPreviewData->lpWinTxt), &rc, DT_LEFT);
|
||||||
SelectObject(hdc, hOldFont);
|
SelectObject(hdc, hOldFont);
|
||||||
|
|
||||||
|
@ -444,12 +443,12 @@ OnLButtonDown(HWND hwnd, int xPos, int yPos, PPREVIEW_DATA pPreviewData)
|
||||||
if (PtInRect(&pPreviewData->rcActiveCaptionButtons, pt))
|
if (PtInRect(&pPreviewData->rcActiveCaptionButtons, pt))
|
||||||
type = IDX_CAPTION_BUTTON;
|
type = IDX_CAPTION_BUTTON;
|
||||||
|
|
||||||
if (PtInRect(&pPreviewData->rcActiveMenuBar, pt))
|
|
||||||
type = IDX_MENU;
|
|
||||||
|
|
||||||
// if (PtInRect(&pPreviewData->rcSelectedMenuItem, pt))
|
// if (PtInRect(&pPreviewData->rcSelectedMenuItem, pt))
|
||||||
// type = IDX_SELECTION;
|
// type = IDX_SELECTION;
|
||||||
|
|
||||||
|
if (PtInRect(&pPreviewData->rcActiveMenuBar, pt))
|
||||||
|
type = IDX_MENU;
|
||||||
|
|
||||||
if (PtInRect(&pPreviewData->rcActiveClient, pt))
|
if (PtInRect(&pPreviewData->rcActiveClient, pt))
|
||||||
type = IDX_WINDOW;
|
type = IDX_WINDOW;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue