CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2003
    Location
    Brazil
    Posts
    335

    Removing the close caption dynamically

    Hi all,

    I´m working with a MDI aplication and I have several (about 3 or 4) windows opened. the situation is if an indicated window is closed, another indicated windows cannot be closed anymore. I trying to remove its close caption but I haven´t had success. Can anyone tell me how to remove ( od disable) the close caption of a MDI child window dynamically?

    Thank you in advance.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: Removing the close caption dynamically

    How did you "try to remove its close caption"? Didi you use GetSystemMenu ? Something like this:
    Code:
    	CMenu *pSysMenu = GetSystemMenu(FALSE);
    	ASSERT(pSysMenu != NULL);
    	VERIFY(pSysMenu->RemoveMenu(SC_CLOSE, MF_BYCOMMAND));	// or you could use CMenu::EnableMenuItem to disable it:
    	// pSysMenu->EnableMenuItem(SC_CLOSE, MF_GRAYED | MF_BYCOMMAND);
    	// ... and to enable it:
    	//   pSysMenu->EnableMenuItem(SC_CLOSE, MF_ENABLED | MF_BYCOMMAND);

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