想找一个IE窗口,给它发一个URL并显示URL指定的内容人,有人说可以用
ShellExecute(0,pchar('open'), pchar'www.sina.com.cn'), '', '', SW_SHOWNORMAL);  但我用过之后发现ShellExecute会把URL发送给我最后建的哪个IE窗口,请问我能不能指定一个IE窗口呀???谢谢!!

解决方案 »

  1.   

    可以的啊,ShellExecute的原型是
    HINSTANCE ShellExecute(
        HWND hwnd, // handle to parent window
        LPCTSTR lpOperation, // pointer to string that specifies operation to perform
        LPCTSTR lpFile, // pointer to filename or folder name string
        LPCTSTR lpParameters, // pointer to string that specifies executable-file parameters 
        LPCTSTR lpDirectory, // pointer to string that specifies default directory
        INT nShowCmd  // whether file is shown when opened
       );
    你选定hwnd发啊
      

  2.   

    可以使用findwindow来找到特定的窗口
      

  3.   

    ShellExecute(0,pchar('open'), pchar'www.sina.com.cn'), '', pchar('_blank'), SW_SHOWNORMAL);
      

  4.   

    ShellExecute(0,pchar('open'), pchar('www.sina.com.cn'), '', pchar('_blank'), SW_SHOWNORMAL);
      

  5.   

    请对WINDOWS理解更多一点再问这个问题。