Compartilhar via


CMDIFrameWndEx::EnableWindowsDialog

Inserts a menu item whose command ID calls a CMFCWindowsManagerDialog dialog box.

void EnableWindowsDialog(
   UINT uiMenuId,
   LPCTSTR lpszMenuText,
   BOOL bShowAllways=FALSE,
   BOOL bShowHelpButton=FALSE 
);
void EnableWindowsDialog(
   UINT uiMenuId,
   UINT uiMenuTextResId,
   BOOL bShowAllways=FALSE,
   BOOL bShowHelpButton=FALSE 
);

Parameters

  • [in] uiMenuId
    Specifies the resource ID of a menu.

  • [in] lpszMenuText
    Specifies the item's text.

  • [in] bShowHelpButton
    Specifies whether to display a Help button on the windows management dialog box.

  • [in] uiMenuTextResId
    The string resource identifier that contains the item's text string.

Remarks

Use this method to insert a menu item whose command calls a MDI child window management dialog box (CMFCWindowsManagerDialog Class). The new item is inserted into the menu specified by uiMenuId. Call EnableWindowsDialog when you process the WM_CREATE message.

Example

The following example shows how EnableWindowsDialog is used in the VisualStudioDemo Sample: MFC Visual Studio Application.

// Enable windows manager:
    EnableWindowsDialog(ID_WINDOW_MANAGER, _T("Windows..."), TRUE);

Requirements

Header: afxMDIFrameWndEx.h

See Also

Reference

CMDIFrameWndEx Class

Hierarchy Chart