CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 1999
    Posts
    35

    CMiniFrameWnd system menu

    Hello,

    I have got a CMiniFrameWnd in my Application and want to know, how to get access to the system menu in the title bar. The method CWnd::GetMenu() obviously returns NULL but the method CWnd::GetSystemMenu(FALSE) also returns NULL. Does anybody know how to get access to the menu?

    Thanks, Jörg



  2. #2
    Join Date
    Apr 1999
    Posts
    16

    Re: CMiniFrameWnd system menu

    Use CWnd::GetSysMenu(FALSE) is right,
    try to find the error.


  3. #3
    Guest

    Re: CMiniFrameWnd system menu

    CMenu* pSysMenu = GetSystemMenu(FALSE);
    pSysMenu->DeleteMenu(SC_MOVE, MF_BYCOMMAND); // example delete item
    CString str; // how to add an item, you must map to the OnSysCommand where IDD_ABOUTBOX is nID
    str.LoadString(IDD_ABOUTBOX);
    pSysMenu->AppendMenu(MF_SEPARATOR);
    pSysMenu->AppendMenu(MF_STRING,IDD_ABOUTBOX,str);
    pSysMenu->EnableMenuItem(IDD_ABOUTBOX, MF_BYCOMMAND);

    I don't have a log-in, Shepard Plowden


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured