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,

CodePudding user response:

reference 1st floor Avan_Lau response:
based on DLL window handle, directly SetWindowPos change size, need not each DLL window processing the message,


Don't each DLL window processing the message, what does it mean

CodePudding user response:

refer to the second floor mycool2006 response:
Quote: refer to 1st floor Avan_Lau response:

On the basis of DLL window handle, directly SetWindowPos change size, need not each DLL window processing the message,


Don't each DLL window processing the message, what does it mean

You don't have the WM_USER + 100 this kind of news, the other, the statements best put a unified position, avoid conflict,

CodePudding user response:

reference Avan_Lau reply: 3/f
Quote: refer to the second floor mycool2006 response:

Quote: refer to 1st floor Avan_Lau response:

On the basis of DLL window handle, directly SetWindowPos change size, need not each DLL window processing the message,


Don't each DLL window processing the message, what does it mean

You don't have the WM_USER + 100 this kind of message, on the other, the statements best put a unified position, avoid conflict,



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;


Thank you moderator, I actually make a change on here:

SetWindowPos (Integer (TRzTabSheet (the Sender). The Tag), HWND_TOP, 0, 0, TRzTabSheet (Sender). Width, TRzTabSheet (Sender). Height, SWP_SHOWWINDOW);

SWP_NOSIZE into SWP_SHOWWINDOW need not into DLL form processing,
Didn't see this parameter

CodePudding user response:

Relevant API introduces, just see the MSDN

CodePudding user response:

reference 5 floor Avan_Lau reply:
related API, just look at the MSDN



Thank you moderator ah, is there any contact information, , want to consult with

CodePudding user response:

refer to 6th floor mycool2006 response:
Quote: refer to the fifth floor Avan_Lau reply:

Relevant API introduces, just look at the MSDN



Thank you moderator ah, is there any contact information, , want to consult more consult

There is a problem, ask questions or direct messages to me, I only have free time, just come up, the general problem, try to solve by searching and avoid waste too much time,

CodePudding user response:

refer to 7th floor Avan_Lau response:
Quote: refer to the sixth floor mycool2006 response:

Quote: refer to the fifth floor Avan_Lau reply:

Relevant API introduces, just look at the MSDN



Thank you moderator ah, is there any contact information, , want to consult more consult

There is a problem, ask questions or direct messages to me, I only have free time, just come up, the general problem, try to solve by searching and avoid waste too much time,


Thank you for your webmaster

CodePudding user response:

nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related