设为首页 加入收藏

TOP

对话方块(六十)
2010-12-30 21:13:56 来源: 作者: 【 】 浏览:40924
Tags:对话 方块
;

case WM_INITMENUPOPUP:
switch (lParam)
{
case 1: // Edit menu

// Enable Undo if edit control can do it

EnableMenuItem ((HMENU) wParam, IDM_EDIT_UNDO,
SendMessage (hwndEdit, EM_CANUNDO, 0, 0L)
MF_ENABLED : MF_GRAYED) ;

// Enable Paste if text is in the clipboard

EnableMenuItem ((HMENU) wParam, IDM_EDIT_PASTE,
IsClipboardFormatAvailable (CF_TEXT)
MF_ENABLED : MF_GRAYED) ;

// Enable Cut, Copy, and Del if text is selected

SendMessage (hwndEdit, EM_GETSEL, (WPARAM) &iSelBeg,
(LPARAM) &iSelEnd) ;

iEnable = iSelBeg != iSelEnd MF_ENABLED : MF_GRAYED ;

EnableMenuItem ((HMENU) wParam, IDM_EDIT_CUT, iEnable) ;
EnableMenuItem ((HMENU) wParam, IDM_EDIT_COPY, iEnable) ;
EnableMenuItem ((HMENU) wParam, IDM_EDIT_CLEAR, iEnable) ;
break ;

case 2: // Search menu

// Enable Find, Next, and Replace if modeless
// dialogs are not already active

iEnable = hDlgModeless == NULL
MF_ENABLED : MF_GRAYED ;
EnableMenuItem ((HMENU) wParam, IDM_SEARCH_FIND, iEnable) ;
EnableMenuItem ((HMENU) wParam, IDM_SEARCH_NEXT, iEnable) ;
EnableMenuItem ((HMENU) wParam, IDM_S
首页 上一页 57 58 59 60 61 62 63 下一页 尾页 60/82/82
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇剪贴簿 下一篇功能表及其他资源

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: