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. Window Minimization problem

Window Minimization problem

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpannouncement
7 Posts 4 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
    pri_skit
    wrote on last edited by
    #1

    Hi, i am using ShellExecuteEx function in an Embeded VC++(MFC Based) to run other application(not MFC) but its Window not get Minimized though i am passing ShExecInfo.nShow = SW_MINIMIZE parameter. My Code is: BOOL CSBCApp::InitInstance() { CMainFrame* pFrame = new CMainFrame; m_pMainWnd = pFrame; pFrame->LoadFrame(IDR_MAINFRAME, WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL, NULL); SHELLEXECUTEINFO ShExecInfo = {0}; ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO); ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS; ShExecInfo.hwnd = NULL; ShExecInfo.lpVerb = NULL; ShExecInfo.lpFile = _T("Disk\\MyTest.exe"); ShExecInfo.lpParameters = _T(""); ShExecInfo.lpDirectory = NULL; ShExecInfo.nShow = SW_MINIMIZE; ShExecInfo.hInstApp = NULL; bool ReturnType=ShellExecuteEx(&ShExecInfo); // The one and only window has been initialized, so show and update it. pFrame->ShowWindow(m_nCmdShow); pFrame->UpdateWindow(); return TRUE; } Warm Regards,

    priyank

    P M 2 Replies Last reply
    0
    • P pri_skit

      Hi, i am using ShellExecuteEx function in an Embeded VC++(MFC Based) to run other application(not MFC) but its Window not get Minimized though i am passing ShExecInfo.nShow = SW_MINIMIZE parameter. My Code is: BOOL CSBCApp::InitInstance() { CMainFrame* pFrame = new CMainFrame; m_pMainWnd = pFrame; pFrame->LoadFrame(IDR_MAINFRAME, WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL, NULL); SHELLEXECUTEINFO ShExecInfo = {0}; ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO); ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS; ShExecInfo.hwnd = NULL; ShExecInfo.lpVerb = NULL; ShExecInfo.lpFile = _T("Disk\\MyTest.exe"); ShExecInfo.lpParameters = _T(""); ShExecInfo.lpDirectory = NULL; ShExecInfo.nShow = SW_MINIMIZE; ShExecInfo.hInstApp = NULL; bool ReturnType=ShellExecuteEx(&ShExecInfo); // The one and only window has been initialized, so show and update it. pFrame->ShowWindow(m_nCmdShow); pFrame->UpdateWindow(); return TRUE; } Warm Regards,

      priyank

      P Offline
      P Offline
      prasad_som
      wrote on last edited by
      #2

      pri_skit wrote:

      ShExecInfo.nShow = SW_MINIMIZE;

      Use SW_SHOWMINIMIZED instead.

      Prasad Notifier using ATL | Operator new[],delete[][^]

      P 1 Reply Last reply
      0
      • P prasad_som

        pri_skit wrote:

        ShExecInfo.nShow = SW_MINIMIZE;

        Use SW_SHOWMINIMIZED instead.

        Prasad Notifier using ATL | Operator new[],delete[][^]

        P Offline
        P Offline
        pri_skit
        wrote on last edited by
        #3

        WINDOW CE(5.0) does not support SW_SHOWMINIMIZED. Message displayed: error C2065: 'SW_SHOWMINIMIZED' : undeclared identifier

        priyank

        P R 2 Replies Last reply
        0
        • P pri_skit

          WINDOW CE(5.0) does not support SW_SHOWMINIMIZED. Message displayed: error C2065: 'SW_SHOWMINIMIZED' : undeclared identifier

          priyank

          P Offline
          P Offline
          prasad_som
          wrote on last edited by
          #4

          pri_skit wrote:

          WINDOW CE(5.0) does not support SW_SHOWMINIMIZED

          Yes. I overseen WinCE in your original post. With available options for ShowWindow on WinCE it doesn't seem possible.

          Prasad Notifier using ATL | Operator new[],delete[][^]

          1 Reply Last reply
          0
          • P pri_skit

            WINDOW CE(5.0) does not support SW_SHOWMINIMIZED. Message displayed: error C2065: 'SW_SHOWMINIMIZED' : undeclared identifier

            priyank

            R Offline
            R Offline
            Rajesh R Subramanian
            wrote on last edited by
            #5

            Only the following are supported in WinCE. SW_SHOW, SW_HIDE, SW_SHOWNORMAL, SW_SHOWNA If your requirement is to create a new window but to retain the topmost state of your current window, then create the new window with SW_SHOWNA as the nCmdShow parameter to ShowWindow().


            Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

            1 Reply Last reply
            0
            • P pri_skit

              Hi, i am using ShellExecuteEx function in an Embeded VC++(MFC Based) to run other application(not MFC) but its Window not get Minimized though i am passing ShExecInfo.nShow = SW_MINIMIZE parameter. My Code is: BOOL CSBCApp::InitInstance() { CMainFrame* pFrame = new CMainFrame; m_pMainWnd = pFrame; pFrame->LoadFrame(IDR_MAINFRAME, WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL, NULL); SHELLEXECUTEINFO ShExecInfo = {0}; ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO); ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS; ShExecInfo.hwnd = NULL; ShExecInfo.lpVerb = NULL; ShExecInfo.lpFile = _T("Disk\\MyTest.exe"); ShExecInfo.lpParameters = _T(""); ShExecInfo.lpDirectory = NULL; ShExecInfo.nShow = SW_MINIMIZE; ShExecInfo.hInstApp = NULL; bool ReturnType=ShellExecuteEx(&ShExecInfo); // The one and only window has been initialized, so show and update it. pFrame->ShowWindow(m_nCmdShow); pFrame->UpdateWindow(); return TRUE; } Warm Regards,

              priyank

              M Offline
              M Offline
              MuraliKrishnaP
              wrote on last edited by
              #6

              you specified the window to minimize ShExecInfo.nShow = SW_MINIMIZE; you are again specifying the window to show with m_nCmdShow pFrame->ShowWindow(m_nCmdShow); it depends on m_nCmdShow. comment Show and UpdateWindow functions. it may work. HTH, -- Murali Krishna.

              P 1 Reply Last reply
              0
              • M MuraliKrishnaP

                you specified the window to minimize ShExecInfo.nShow = SW_MINIMIZE; you are again specifying the window to show with m_nCmdShow pFrame->ShowWindow(m_nCmdShow); it depends on m_nCmdShow. comment Show and UpdateWindow functions. it may work. HTH, -- Murali Krishna.

                P Offline
                P Offline
                pri_skit
                wrote on last edited by
                #7

                pFrame->ShowWindow(m_nCmdShow); This function is for Main MFC Application. I am using ShellExecuteEx() fuction to run an other Application(not MFC,.exe file) which get minimize at StartUp.Therefore ShExecInfo.nShow = SW_MINIMIZE; is used. HTH,

                priyank

                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