mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 12:43:09 +00:00
[NOTEPAD] Simplify NOTEPAD_EnableSearchMenu (#5077)
This commit is contained in:
parent
efb923073c
commit
a5aea8e537
1 changed files with 4 additions and 4 deletions
|
@ -33,10 +33,10 @@ static ATOM aFINDMSGSTRING;
|
|||
|
||||
VOID NOTEPAD_EnableSearchMenu()
|
||||
{
|
||||
EnableMenuItem(Globals.hMenu, CMD_SEARCH,
|
||||
MF_BYCOMMAND | ((GetWindowTextLength(Globals.hEdit) == 0) ? MF_DISABLED | MF_GRAYED : MF_ENABLED));
|
||||
EnableMenuItem(Globals.hMenu, CMD_SEARCH_NEXT,
|
||||
MF_BYCOMMAND | ((GetWindowTextLength(Globals.hEdit) == 0) ? MF_DISABLED | MF_GRAYED : MF_ENABLED));
|
||||
BOOL bEmpty = (GetWindowTextLengthW(Globals.hEdit) == 0);
|
||||
UINT uEnable = MF_BYCOMMAND | (bEmpty ? MF_GRAYED : MF_ENABLED);
|
||||
EnableMenuItem(Globals.hMenu, CMD_SEARCH, uEnable);
|
||||
EnableMenuItem(Globals.hMenu, CMD_SEARCH_NEXT, uEnable);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue