Home > Back-end > EXE DLL form called fusion, DLL form problem. Solved the record.
EXE DLL form called fusion, DLL form problem. Solved the record.
Time:10-03
EXE DLL form called fusion, has been EXE of size change over time, the DLL form won't have change, Now solved the record, for your reference, there are more good way also posted let everyone share share,
Procedure tabSheetOnResize (Sender: TObject); Procedure TForm1. TabSheetOnResize (Sender: TObject); The begin If the Sender is TRzTabSheet then The begin //size to send message to child form tabSheet happen tabSheet child form size change If TRzTabSheet (Sender). The Tag & lt;> 0 then The begin SendMessage (Integer (TRzTabSheet (the Sender). The Tag), WM_USER + 100, TRzTabSheet (Sender). ClientWidth, TRzTabSheet (Sender). ClientHeight); end; end; end; -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Procedure TForm1. Button1Click (Sender: TObject); The begin AddFrmTrue end; The function TForm1. AddFrmTrue: Boolean; Var Tpage: TRzTabSheet; AFormClass: TFormClass; The begin Tpage:=TRzTabSheet. Create (RzPageControl1); Tpage. PageControl:=RzPageControl1; AFormClass:=ShowForm (Application, tpage); AForm:=aFormClass. Create (tpage); Windows. SetParent (aForm. Handle, tpage. Handle). AForm. Show; Tpage. Tag:=aForm. Handle; Tpage. Caption:=IntToStr (tpage. Tag); RzPageControl1. ActivePage:=tpage; Tpage. OnResize:=tabSheetOnResize; Tpage. OnResize (tpage); end;
Child form DLL
Procedure ChangeMsg (var MSG: TMessage); The message WM_USER + 100;
Procedure TFormA. ChangeMsg (var MSG: TMessage); The begin Self. Width:=MSG. WParam; Self. Height:=MSG. LParam; SetWindowPos (self. Handle, 0, 0, 0, the self. The Width of the self. The Height, SWP_NOSIZE); end;
CodePudding user response:
On the basis of DLL window handle, directly SetWindowPos change size, need not each DLL window processing the message,