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. Maximize dialog based app on startup

Maximize dialog based app on startup

Scheduled Pinned Locked Moved C / C++ / MFC
help
3 Posts 3 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.
  • P Offline
    P Offline
    pma
    wrote on last edited by
    #1

    Hi, I need a proper way of keeping a window maximized all the time. On startup its quite easy, I just call: ShowWindow(SW_SHOWMAXIMIZED); But the problem is if the user minimizes the window and then reopens it, then it wont be maximized again. Thank you for your help Mario

    P T 2 Replies Last reply
    0
    • P pma

      Hi, I need a proper way of keeping a window maximized all the time. On startup its quite easy, I just call: ShowWindow(SW_SHOWMAXIMIZED); But the problem is if the user minimizes the window and then reopens it, then it wont be maximized again. Thank you for your help Mario

      P Offline
      P Offline
      Prakash Nadar
      wrote on last edited by
      #2

      in the oninitdialog resize the window using setwindowpos(...).

      1 Reply Last reply
      0
      • P pma

        Hi, I need a proper way of keeping a window maximized all the time. On startup its quite easy, I just call: ShowWindow(SW_SHOWMAXIMIZED); But the problem is if the user minimizes the window and then reopens it, then it wont be maximized again. Thank you for your help Mario

        T Offline
        T Offline
        ThatsAlok
        wrote on last edited by
        #3

        ok you can use following code buddy add window handller WM_SIZE ok void OnSize( UINT nType, int cx, int cy ){ if(nType==SIZE_MINIMIZED) { }else { this->ShowWindow(SW_SHOW_MAXIMIZED); } } ok that very simple:) Alok Gupta visit me at http://alok.stormpages.com

        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