请问如何在MDI程序中调用DLL中的子窗口(100分)

  • 主题发起人 主题发起人 kim_fu
  • 开始时间 开始时间
K

kim_fu

Unregistered / Unconfirmed
GUEST, unregistred user!
当我把DLL中的窗口设置成MDIChild的时候,在MDI主程序中调用就非法操作。<br><br>请那位富翁帮帮我。
 
Dll的写法<br>Exports<br>&nbsp; TechTemplateFormCreate; &nbsp; &nbsp; &nbsp; &nbsp; //&amp;sup1;¤&amp;ETH;ò&amp;Auml;&amp;pound;°&amp;aring;<br><br>Var DllApplication:TApplication;<br>&nbsp; &nbsp; DllScreen:TScreen;<br><br>{$R *.RES}<br><br>procedure LibraryProc(Reason: Integer);<br>begin<br>&nbsp; if Reason = DLL_PROCESS_DETACH then<br>&nbsp; begin<br>&nbsp; &nbsp; Screen:=DllScreen;<br>&nbsp; &nbsp; Application:=DllApplication;<br>&nbsp; end;<br>end;<br><br>begin<br>&nbsp; DllApplication:=Application;<br>&nbsp; DllScreen:=Screen;<br>&nbsp; DLLProc:=@LibraryProc;<br>end.<br>----------------------------------------<br>TechTemplateForm<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-------------<br>Procedure TechTemplateFormCreate(MDIApplication:TApplication);Export;<br><br>implementation<br><br>{$R *.DFM}<br><br>Procedure TechTemplateFormCreate(MDIApplication:TApplication);Export;<br>begin<br>&nbsp;if (not Assigned(TechTemplateForm)) then<br>&nbsp; begin<br>&nbsp; &nbsp; Application:=MDIApplication;<br>&nbsp; &nbsp; TechTemplateForm:=TTechTemplateForm.Create(Application);<br>&nbsp; end<br>&nbsp; else<br>&nbsp; begin<br>&nbsp; &nbsp; //TechTemplateForm.WindowState:=wsNormal;;<br>&nbsp; &nbsp; TechTemplateForm.BringToFront;<br>&nbsp; end;<br>end;<br>
 
谢谢。我试试。好使的话给你加分。呵呵。
 
快点,我等不急
 
接受答案了.
 
后退
顶部