Solved

TForm will mask messages that should be sent to plugin DLL?

Posted on 2001-07-31
4
203 Views
Last Modified: 2013-11-18
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.Handle, PluginPanel.Handle);

2.In the external DLL, the LoadPlugin is as below:
>> LoadPlugin(hAPP: THANDLE; hHostWnd: HWND);
>> begin
>>   Application.Handle := hAPP;
>>   with TfmPlugin.CreateParented(AHostWnd) 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.
0
Comment
Question by:sunset99
4 Comments
 
LVL 3

Expert Comment

by:rondi
ID: 6337492
Try playin with KeyPreview properties.
Set KeyPreview of the Host form to False and maybe
even try setting KeyPreview of the plugin to True.

rondi.
0
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 6339030
try to compile the DLLs with "Build with Runtime Packages" checked.
0
 
LVL 26

Expert Comment

by:Russell Libby
ID: 8735008
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
0
 

Accepted Solution

by:
RotaredoM earned 0 total points
ID: 8822626
sunset99 abandoned the question.

Question PAQed and 100 points removed.

RotaredoM
CS Mod @ EE
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now