Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. MinimizeBox in a PropertySheet?

MinimizeBox in a PropertySheet?

Scheduled Pinned Locked Moved C / C++ / MFC
question
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mathias
    wrote on last edited by
    #1

    Hello! Is it possible to add a minimize box to a property sheet? (and if it is, how?) Thanks! /Mathias

    F 1 Reply Last reply
    0
    • M Mathias

      Hello! Is it possible to add a minimize box to a property sheet? (and if it is, how?) Thanks! /Mathias

      F Offline
      F Offline
      Frank Deo
      wrote on last edited by
      #2

      You can... In your CPropertySheet derived class add the following to the constructor:

      m_psh.dwFlags |= PSH_USEHICON;
      m_psh.hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);

      This will add the icon for the "System Menu". Then, Add a message handler function for "OnCreate", and add this:

      ModifyStyle(0, WS_MINIMIZEBOX|WS_SYSMENU);

      This will add the "Minimize" button to the Non-Client area of the dialog. If you don't want "Maximize". You can add the following to the "OnInitDialog" function in your CPropertySheet class:

      CMenu *pSysMenu = GetSystemMenu(FALSE);
      ASSERT(pSysMenu != NULL);
      VERIFY(pSysMenu->RemoveMenu(SC_MAXIMIZE, MF_BYCOMMAND));

      I've done this in a project, and it works. :) Good Luck, Frank

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups