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. shell execute

shell execute

Scheduled Pinned Locked Moved C / C++ / MFC
comlinuxhelpquestion
5 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.
  • S Offline
    S Offline
    sujtha
    wrote on last edited by
    #1

    Can anyone help me? I tried to open the web page using shell execute in maximized mode. the command as given below: CString webURL = "www.yahoo.com" HINSTANCE hInstance = (HINSTANCE)ShellExecute(this->m_hWnd, _T("open"), webURL, NULL, NULL, SW_MAXIMIZE); or HINSTANCE hInstance = (HINSTANCE)ShellExecute(this->m_hWnd, _T("open"), webURL, NULL, NULL, SW_SHOWMAXIMIZED); it opens the page. but it display as normal not in maximized state. first time it opens maximized. in the internet explorer, if restored and call the same command in the exe, it brings the window in the front. It displays in the normal

    T N D 3 Replies Last reply
    0
    • S sujtha

      Can anyone help me? I tried to open the web page using shell execute in maximized mode. the command as given below: CString webURL = "www.yahoo.com" HINSTANCE hInstance = (HINSTANCE)ShellExecute(this->m_hWnd, _T("open"), webURL, NULL, NULL, SW_MAXIMIZE); or HINSTANCE hInstance = (HINSTANCE)ShellExecute(this->m_hWnd, _T("open"), webURL, NULL, NULL, SW_SHOWMAXIMIZED); it opens the page. but it display as normal not in maximized state. first time it opens maximized. in the internet explorer, if restored and call the same command in the exe, it brings the window in the front. It displays in the normal

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

      sujtha wrote:

      HINSTANCE hInstance = (HINSTANCE)ShellExecute(this->m_hWnd, _T("open"), webURL, NULL, NULL, SW_SHOWMAXIMIZED);

      sound absurbd but try NULL instead of this->m_hWnd.

      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

      cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief

      S 1 Reply Last reply
      0
      • T ThatsAlok

        sujtha wrote:

        HINSTANCE hInstance = (HINSTANCE)ShellExecute(this->m_hWnd, _T("open"), webURL, NULL, NULL, SW_SHOWMAXIMIZED);

        sound absurbd but try NULL instead of this->m_hWnd.

        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

        cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief

        S Offline
        S Offline
        sujtha
        wrote on last edited by
        #3

        i tried null also. same problem....

        1 Reply Last reply
        0
        • S sujtha

          Can anyone help me? I tried to open the web page using shell execute in maximized mode. the command as given below: CString webURL = "www.yahoo.com" HINSTANCE hInstance = (HINSTANCE)ShellExecute(this->m_hWnd, _T("open"), webURL, NULL, NULL, SW_MAXIMIZE); or HINSTANCE hInstance = (HINSTANCE)ShellExecute(this->m_hWnd, _T("open"), webURL, NULL, NULL, SW_SHOWMAXIMIZED); it opens the page. but it display as normal not in maximized state. first time it opens maximized. in the internet explorer, if restored and call the same command in the exe, it brings the window in the front. It displays in the normal

          N Offline
          N Offline
          Naveen
          wrote on last edited by
          #4

          may be you should try like this CString webURL = _T("www.yahoo.com"); HINSTANCE hInstance = (HINSTANCE)ShellExecute(0, _T("open"), _T("C:\\Program Files\\Internet Explorer\\iexplore.exe "), webURL, NULL, SW_SHOWMAXIMIZED);

          nave [OpenedFileFinder]

          1 Reply Last reply
          0
          • S sujtha

            Can anyone help me? I tried to open the web page using shell execute in maximized mode. the command as given below: CString webURL = "www.yahoo.com" HINSTANCE hInstance = (HINSTANCE)ShellExecute(this->m_hWnd, _T("open"), webURL, NULL, NULL, SW_MAXIMIZE); or HINSTANCE hInstance = (HINSTANCE)ShellExecute(this->m_hWnd, _T("open"), webURL, NULL, NULL, SW_SHOWMAXIMIZED); it opens the page. but it display as normal not in maximized state. first time it opens maximized. in the internet explorer, if restored and call the same command in the exe, it brings the window in the front. It displays in the normal

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            From past experience, IE seems to want to do its own thing (e.g., use size/position from last use), rather than what you instruct it to do. I've not researched into this hardly at all, but it just seems to be this way more often than not. You might try calling ShowWindow(hWnd, SW_SHOWMAXIMIZED) once IE is fully opened.


            "A good athlete is the result of a good and worthy opponent." - David Crow

            "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

            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