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. open IE???

open IE???

Scheduled Pinned Locked Moved C / C++ / MFC
question
6 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.
  • X Offline
    X Offline
    xxhimanshu
    wrote on last edited by
    #1

    :confused::confused:Hi all, I want to open IE window with the URL i specify and also I want to position that window and define its height, width..can i do that..and if yes..how..can anyone show me some pointers or tutorials or ideas on this... Thanks a lot in advance.. Himanshu

    J D 2 Replies Last reply
    0
    • X xxhimanshu

      :confused::confused:Hi all, I want to open IE window with the URL i specify and also I want to position that window and define its height, width..can i do that..and if yes..how..can anyone show me some pointers or tutorials or ideas on this... Thanks a lot in advance.. Himanshu

      J Offline
      J Offline
      Jagadeesh VN
      wrote on last edited by
      #2

      Use ShellExecute(...) API "A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."

      1 Reply Last reply
      0
      • X xxhimanshu

        :confused::confused:Hi all, I want to open IE window with the URL i specify and also I want to position that window and define its height, width..can i do that..and if yes..how..can anyone show me some pointers or tutorials or ideas on this... Thanks a lot in advance.. Himanshu

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

        This might work, but you'll want to test it thoroughly in any case:

        DWORD dwProcId;
        HINSTANCE hInstance = ShellExecute(...);

        hWnd = FindWindow(NULL, NULL);
        while (NULL != hWnd)
        {
        if (GetParent(hWnd) == NULL)
        {
        if (hInstance == GetWindowThreadProcessID(hWnd, &dwProcId))
        {
        MoveWindow(hWnd, ...);
        break;
        }
        }

        hWnd = GetWindow(hWnd, GW\_HWNDNEXT);
        

        }


        Five birds are sitting on a fence. Three of them decide to fly off. How many are left?

        X 1 Reply Last reply
        0
        • D David Crow

          This might work, but you'll want to test it thoroughly in any case:

          DWORD dwProcId;
          HINSTANCE hInstance = ShellExecute(...);

          hWnd = FindWindow(NULL, NULL);
          while (NULL != hWnd)
          {
          if (GetParent(hWnd) == NULL)
          {
          if (hInstance == GetWindowThreadProcessID(hWnd, &dwProcId))
          {
          MoveWindow(hWnd, ...);
          break;
          }
          }

          hWnd = GetWindow(hWnd, GW\_HWNDNEXT);
          

          }


          Five birds are sitting on a fence. Three of them decide to fly off. How many are left?

          X Offline
          X Offline
          xxhimanshu
          wrote on last edited by
          #4

          Hi David, Thanks a lot...but i cud not understand how to position the IE window and also how to define size of this IE window..Please help.. thanks a lot in advance himanshu

          D 1 Reply Last reply
          0
          • X xxhimanshu

            Hi David, Thanks a lot...but i cud not understand how to position the IE window and also how to define size of this IE window..Please help.. thanks a lot in advance himanshu

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

            Did you look at the MoveWindow() function? The parameters are self explanatory. MoveWindows(..., left, top, width, height, ...);


            Five birds are sitting on a fence. Three of them decide to fly off. How many are left?

            X 1 Reply Last reply
            0
            • D David Crow

              Did you look at the MoveWindow() function? The parameters are self explanatory. MoveWindows(..., left, top, width, height, ...);


              Five birds are sitting on a fence. Three of them decide to fly off. How many are left?

              X Offline
              X Offline
              xxhimanshu
              wrote on last edited by
              #6

              ;)hiii, thanks a ton...i did that.... regards Himanshu

              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