在一个单文档应用程序中,用ShellExcute调用一个exe文件,通常在ShellExcute执行以后,被调用的exe会以一个新窗口的形式出现。怎样做才能让exe运行后的窗口以嵌入的方式显示在主程序的客户区中?

解决方案 »

  1.   

    SetParent
    SetwindowStyle
    SetWindowLong
      

  2.   

    请说得具体些好吗?我在MSDN里看到对SetParent有这样一段说明: 
    An application can use the SetParent function to set the parent window of a pop-up, overlapped, or child window. The new parent window and the child window must belong to the same application. 
    这是不是意味着对分属两个程序的船窗口用这种方法不行?请各位大虾指教,多谢!
      

  3.   

    可能你得hook住那个程序的界面绘画消息
      

  4.   

    上面MSDN上面已经说了,两个窗口一定要属于同一个应用程序.
      

  5.   

    muroachanf(哈儿)说的SetParent、SetwindowStyle、SetWindowLong可以,我以前用过,但部分程序可能会出问题。