CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 10 of 10
  1. #1
    Join Date
    Feb 2005
    Posts
    30

    How to add "minimize" to system menu??

    How do I add minimize option in the system menu of a CDialog application.

    The application has a minimize box, a close box.
    But in the system menu there is no "_ Minimize" option, how do I add this...

  2. #2
    Join Date
    Feb 2005
    Posts
    30

    Re: How to add "minimize" to system menu??

    Well

    So have the gurus given up on this one or they dont like to ponder over this kinda puny questions...

  3. #3
    Join Date
    Oct 1999
    Location
    Missouri, USA
    Posts
    453

    Re: How to add "minimize" to system menu??

    So, you're saying that the dialog's "Property" setting has "Minimize box" checked, but when you right-click the app's title bar, the popup doesn't include "_Minimize" ?

    In my experience, if the dialog's "Property" had "Minimize box" checked, then, by default, the command should visible in the popup.
    If you need an answer, don't forget to try this link:
    http://www.codeguru.com/forum/search.php?
    __________________

  4. #4
    Join Date
    Feb 2005
    Posts
    30

    Re: How to add "minimize" to system menu??

    thats exactly the problem.

    If it matters, actually the minimize box was not present in the dialog box by default, i added it by doing
    ModifyStyle(0, WS_MINIMIZEBOX );

    yet...

  5. #5
    Join Date
    May 2005
    Posts
    4,954

    Re: How to add "minimize" to system menu??

    do you have _minimize grayed? or not have it at all?

    can you send your project? i will look into that.

    Cheers

  6. #6
    Join Date
    May 2005
    Location
    Netherlands
    Posts
    187

    Re: How to add "minimize" to system menu??

    If it matters, actually the minimize box was not present in the dialog box by default, i added it by doing
    ModifyStyle(0, WS_MINIMIZEBOX );
    Yes, I think that matters. If you change the style after creation you will have to update the system menu yourself as well. I guess the system menu will be based on the initial properties of the dialog.
    Last edited by j66st; June 6th, 2005 at 06:01 AM.

  7. #7
    Join Date
    Oct 2002
    Location
    Italy
    Posts
    324

    Re: How to add "minimize" to system menu??

    Use the GetSystemMenu function to add any item to your dialog's menu.
    http://msdn.microsoft.com/library/en...systemmenu.asp
    Regards,
    Marco Era
    www.marcoera.com

    Latest post on my blog: Back to the Amiga's times

  8. #8
    Join Date
    Feb 2005
    Posts
    30

    Re: How to add "minimize" to system menu??

    Alright I figured a solution.

    Instead of doing a ModifyStyle, I added the minimize box option in the Dialog Properties, and voila it works.

    Thanks all for help.
    Attached Images Attached Images

  9. #9
    Join Date
    May 2005
    Posts
    4,954

    Re: How to add "minimize" to system menu??

    well duh! this is the first thing u should have done :-)
    i thought that u did it and still didnt see the minimize!
    nevermind as long as it working.

    Cheers

  10. #10
    Join Date
    Apr 2005
    Posts
    247

    Re: How to add "minimize" to system menu??

    Cool Scene , way to go pal......

    Regards,
    Ashwin

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