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. Maximizing Aplication

Maximizing Aplication

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
8 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.
  • R Offline
    R Offline
    RuiSantiago
    wrote on last edited by
    #1

    Hi! This should be a easy task for most of you, and it sounds easy, but i can't find in my SDI with MFC aplication where to use WS_MAXIMIZE, but i'm not sure if this is the appropriate procedure because WS_MAXIMIZE is related to a window not an aplication, can you help me? Thank you

    N 1 Reply Last reply
    0
    • R RuiSantiago

      Hi! This should be a easy task for most of you, and it sounds easy, but i can't find in my SDI with MFC aplication where to use WS_MAXIMIZE, but i'm not sure if this is the appropriate procedure because WS_MAXIMIZE is related to a window not an aplication, can you help me? Thank you

      N Offline
      N Offline
      Nish Nishant
      wrote on last edited by
      #2

      void CMainFrame::ActivateFrame(int nCmdShow)
      {
      // TODO: Add your specialized code here and/or call the base class

      CFrameWnd::ActivateFrame(SW\_MAXIMIZE);
      

      }


      Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

      R 1 Reply Last reply
      0
      • N Nish Nishant

        void CMainFrame::ActivateFrame(int nCmdShow)
        {
        // TODO: Add your specialized code here and/or call the base class

        CFrameWnd::ActivateFrame(SW\_MAXIMIZE);
        

        }


        Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

        R Offline
        R Offline
        RuiSantiago
        wrote on last edited by
        #3

        Thank you Nishant S, but what i see now is that the Frame maximizes but it quickly returns to its normal (not maximized) state, i tracked the int nCmdShow argument and i noticed that its value keep being 3 until it reaches a CFrameWnd function : void CFrameWnd::InitialUpdateFrame(CDocument* pDoc, BOOL bMakeVisible) inside this function, nCmdShow, returns to its 'default' value 1, why does this happends? Thanks

        N 1 Reply Last reply
        0
        • R RuiSantiago

          Thank you Nishant S, but what i see now is that the Frame maximizes but it quickly returns to its normal (not maximized) state, i tracked the int nCmdShow argument and i noticed that its value keep being 3 until it reaches a CFrameWnd function : void CFrameWnd::InitialUpdateFrame(CDocument* pDoc, BOOL bMakeVisible) inside this function, nCmdShow, returns to its 'default' value 1, why does this happends? Thanks

          N Offline
          N Offline
          Nish Nishant
          wrote on last edited by
          #4

          I created a new SDI app using VC++ 6 and added the code I had shown. And the app started maximized and without a flicker as well. If it returns to a normal state for you, you must have over ridden some other functions as well. Do this :- (1) Create a fresh SDI app (2) Use the code I had shown in the first post Nish


          Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

          R 3 Replies Last reply
          0
          • N Nish Nishant

            I created a new SDI app using VC++ 6 and added the code I had shown. And the app started maximized and without a flicker as well. If it returns to a normal state for you, you must have over ridden some other functions as well. Do this :- (1) Create a fresh SDI app (2) Use the code I had shown in the first post Nish


            Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

            R Offline
            R Offline
            RuiSantiago
            wrote on last edited by
            #5

            Well, i did it, and it worked, i don't know why it doesn't in my application, what do you think is most probable to be happening? What else can i look for to find where am i iver ridden other functions, i keep on debbuging but i can't find the reasin for the Frame to come back to its 'normal' state! Thank you

            1 Reply Last reply
            0
            • N Nish Nishant

              I created a new SDI app using VC++ 6 and added the code I had shown. And the app started maximized and without a flicker as well. If it returns to a normal state for you, you must have over ridden some other functions as well. Do this :- (1) Create a fresh SDI app (2) Use the code I had shown in the first post Nish


              Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

              R Offline
              R Offline
              RuiSantiago
              wrote on last edited by
              #6

              Well, i guess i found the reason, when i change windows i use: pNewActiveView->Create(NULL, NULL, 0L, CFrameWnd::rectDefault, this, ViewID, &context); pNewActiveView->OnInitialUpdate(); maybe its because of the CFrameWnd::rectDefault that it over rides that argument, what do you think? How can i change it to maximized, i look at its member function and variables but nothing seemed to fit with my intents! Thanks

              1 Reply Last reply
              0
              • N Nish Nishant

                I created a new SDI app using VC++ 6 and added the code I had shown. And the app started maximized and without a flicker as well. If it returns to a normal state for you, you must have over ridden some other functions as well. Do this :- (1) Create a fresh SDI app (2) Use the code I had shown in the first post Nish


                Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

                R Offline
                R Offline
                RuiSantiago
                wrote on last edited by
                #7

                Well, it was not what i expected :( I'll trying to find witch function i over ride, if there is someone who has a ideia i would appreciate very much an advise.

                R 1 Reply Last reply
                0
                • R RuiSantiago

                  Well, it was not what i expected :( I'll trying to find witch function i over ride, if there is someone who has a ideia i would appreciate very much an advise.

                  R Offline
                  R Offline
                  RuiSantiago
                  wrote on last edited by
                  #8

                  Hoorah, viva!!! I found it!! I was making m_pMainWnd->ShowWindow(TRUE); instead of m_pMainWnd->ShowWindow(SW_SHOW); in my C..app file Thank you for your time

                  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