🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #2801

Re: form inside a dll loaded by a console application

#2801
From: John van de Geyn
Date: Wed, 27 Dec 2006 22:26
37 lines
2364 bytes
Instead of creating a new Form would it not be easier to spawn a new stand 
alone application from the DLL?

John

"Stefano Bonifazi" <stefboombastic@email.it> wrote in message 
news:458e4f48@newsgroups.borland.com...
> Hi all!
>  I know how to create a form inside a dll, and make the module that load 
> the dll show it! ...It's quite easy! ... But if I try to load that dll and 
> show the form form inside a console application I notice that my form does 
> not answer any more to windows messages :(
> I tried to create a hidden window by the following code:
>
> __fastcall TNodzSimulatorForm::TNodzSimulatorForm(TComponent* Owner)
>         : TForm(Owner)
> {
>  FWindowHandle = AllocateHWnd(MyWndProc);
> }
> //---------------------------------------------------------------------------
> void __fastcall TNodzSimulatorForm::MyWndProc(TMessage &Msg)
> {
>  Msg.Result = DefWindowProc(FWindowHandle, Msg.Msg, Msg.WParam, 
> Msg.LParam);
> }
> //------------------------------------------------------------------------------
> __fastcall TNodzSimulatorForm::~TNodzSimulatorForm()
> {
>  DeallocateHWnd(FWindowHandle);
> }
> //-----------------------------------------------------------------------------
>
>
> but nothing is changed :(
> Please it's very urgent.. and I don't know what to do!
> Thank You very much in advance!
> Stefano B. 
Technical Details
Message-ID: <4592f2f3@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!news.albasani.net!feeder06.uucp-net.de!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail
References: <458e4f48@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,3fa2091e9808a898
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "John van de Geyn" <j.vandegeyn@uq.net.au>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <458e4f48@newsgroups.borland.com>
Subject: Re: form inside a dll loaded by a console application
Date: Thu, 28 Dec 2006 08:26:18 +1000
Lines: 39
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 144.136.135.226
Message-ID: <4592f2f3@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1167258355 144.136.135.226 (27 Dec 2006 14:25:55 -0800)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!news.albasani.net!feeder06.uucp-net.de!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail