sunset99
asked on
TForm will mask messages that should be sent to plugin DLL?
In my application, the main form will get a plugin form, which contain a TMemo component, from external dll and display this form in a panel. (Of course, the plugin form's BorderStyle is already setted to bsNone)
1.The main form will show the external form like this:
>> LoadPlugin(Application.Han dle, PluginPanel.Handle);
2.In the external DLL, the LoadPlugin is as below:
>> LoadPlugin(hAPP: THANDLE; hHostWnd: HWND);
>> begin
>> Application.Handle := hAPP;
>> with TfmPlugin.CreateParented(A HostWnd) do
>> Show;
>> end;
3.Result:
Yes, fmPlugin can display correctly in PluginPanel, but the TMemo on fmPlugin can't get arrow key events. If fmPlugin display common dialogs, such as FindDialog, shortcut keys for dialog can't work either.
I think the main form must have masked some keyboard messages which should be sent to the plugin DLL, but I don't know how to solve this problem, if you know, please tell me.
Many thanks.
1.The main form will show the external form like this:
>> LoadPlugin(Application.Han
2.In the external DLL, the LoadPlugin is as below:
>> LoadPlugin(hAPP: THANDLE; hHostWnd: HWND);
>> begin
>> Application.Handle := hAPP;
>> with TfmPlugin.CreateParented(A
>> Show;
>> end;
3.Result:
Yes, fmPlugin can display correctly in PluginPanel, but the TMemo on fmPlugin can't get arrow key events. If fmPlugin display common dialogs, such as FindDialog, shortcut keys for dialog can't work either.
I think the main form must have masked some keyboard messages which should be sent to the plugin DLL, but I don't know how to solve this problem, if you know, please tell me.
Many thanks.
try to compile the DLLs with "Build with Runtime Packages" checked.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
To be PAQ/Refund
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
Thank you,
Russell
EE Cleanup Volunteer
I will leave a recommendation in the Cleanup topic area that this question is:
To be PAQ/Refund
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
Thank you,
Russell
EE Cleanup Volunteer
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Set KeyPreview of the Host form to False and maybe
even try setting KeyPreview of the plugin to True.
rondi.