silverpot请进.同样是关于子窗体的问题
//---------------------------------------#include <vcl.h>#pragma hdrstop#include "assert.h"#include "Unit1.h"#include "Unit2.h"//---------------------------------------#pragma package(smart_init)#pragma resource "*.dfm"TForm1 *Form1;//---------------------------------------HWND GetDesktopListViewHandle(void) { HWND hResult; hResult=::FindWindow("ProgMan",NULL); hResult=::GetWindow(hResult,GW_CHILD); hResult=::GetWindow(hResult,GW_CHILD); return hResult; }__fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner){}//---------------------------------------void __fastcall TForm1::Btn1Click(TObject *Sender){ ::SetParent(Form2->Handle,GetDesktopListViewHandle()); Form2->Show(); }//---------------------------------------