> 1) use a plugin DLL - works, but a bit ugly since the forms used in the DLL > have to StayOnTop and are producing similar errors to the other thread where > things like FileOpen dialogs are being hidden behind the DLL forms.
The NormaliseTopMosts and RestoreTopMosts methods should fix this problem - see Delphi help for more info. You can perhaps move your Active-X server into a DLL and register it. There should be no code change required for the client because you would be using the ProgID to create an instance of the server, and when you do that, OLE will load the DLL for you. This is your in-process server! Dennis. ----- Original Message ----- From: "Phil Middlemiss" <[EMAIL PROTECTED]> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]> Sent: Thursday, September 18, 2003 8:48 AM Subject: Re: [DUG]: Sharing a drawing surface > Thanks Dennis, > > The situation is that a plugin wants to annotate the drawing surface. I've > explored 2 options: > > 1) use a plugin DLL - works, but a bit ugly since the forms used in the DLL > have to StayOnTop and are producing similar errors to the other thread where > things like FileOpen dialogs are being hidden behind the DLL forms. > > 2) use a separate exe that connects to the main program via an ActiveX > server inside the main program. This doesn't give me access to the drawing > surface anymore. > > I probably should have explained that earlier. I can't make the plugin an > in-process ActiveX server since the main program only finds out at run time > what plugins there are (looks for files in a directory). Is that what you > meant? > > Phil. > ----- Original Message ----- > From: "Dennis Chuah" <[EMAIL PROTECTED]> > To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]> > Sent: Thursday, September 18, 2003 7:19 AM > Subject: Re: [DUG]: Sharing a drawing surface > > > > > > Phil, > > > > You cannot share a DC between different processes - because they are in > > different address space. However, you can try to FindWindow to look for > the > > window handle, and obtain a DC to paint on its surface. > > > > The other suggestion is to use an in-process (ie Active-X DLL) server. > > > > Dennis. > > > > ----- Original Message ----- > > From: "Phil Middlemiss" <[EMAIL PROTECTED]> > > To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]> > > Sent: Wednesday, September 17, 2003 1:16 PM > > Subject: [DUG]: Sharing a drawing surface > > > > > > > Apologies if you get this twice but I think our mail server swallowed it > > the > > > first time I sent it: > > > > > > Does anyone know how to share a device context for drawing between > > separate > > > programs? Is it possible at all? I have tried passing the handle to the > > > context using an ActiveX connection so that a separate program can > > annotate > > > an image but even though the correct handle value is passed, none of the > > > annotation code seems to have any effect (the drawing code itself works > > > fine - I've tested that separately). > > > > > > > > > Any help would be appreciated. > > > > > > Cheers, > > > Phil. > > > > > > > -------------------------------------------------------------------------- > > - > > > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] > > > Website: http://www.delphi.org.nz > > > To UnSub, send email to: [EMAIL PROTECTED] > > > with body of "unsubscribe delphi" > > > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ > > > > > -------------------------------------------------------------------------- > - > > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] > > Website: http://www.delphi.org.nz > > To UnSub, send email to: [EMAIL PROTECTED] > > with body of "unsubscribe delphi" > > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ > > > > > -------------------------------------------------------------------------- - > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] > Website: http://www.delphi.org.nz > To UnSub, send email to: [EMAIL PROTECTED] > with body of "unsubscribe delphi" > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ > --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
