有一个mdi子窗口mdi_1,然后在mid_1窗口中mdi_11:= tmdi_11.Create(self),最后在mdi_11中找mdi_1窗口的句柄,不能找到.请介绍一下findwindowex使用方法.我使用的findwindow可以找到非mdi窗口
hd:=findwindow('mdi_1',0)使用findwindowex什么都找不到
hd:=findwindowex(mdi_1.ParentWindow,0,'mdi_1',nil);

解决方案 »

  1.   

    已经解决了,但是'MDIClient'还不清楚是什么意思//参考如下代码   
      var   
          vHandle:   THandle;   
      begin   
          vHandle   :=   FindWindow('TForm1',   nil);   //寻找MDI主窗体   
          Memo1.Lines.Add(IntToStr(vHandle));   
          vHandle   :=   FindWindowEx(vHandle,   0,   'MDIClient',   nil);   //寻找MDI容器区域   
          Memo1.Lines.Add(IntToStr(vHandle));   
          vHandle   :=   FindWindowEx(vHandle,   0,   'TForm3',   nil);   //寻找MDI子窗体   
      end;
      

  2.   

    FindWindowEx(
    Parent: HWND;                       {a handle to a parent window}
    Child: HWND;                       {a handle to a child window}
    ClassName: PChar;                 {a pointer to a null terminated class name string}
    WindowName: PChar                {a pointer to a null terminated window name string}
    ): HWND;                                {returns a handle to a window}