Article View: borland.public.cppbuilder.nativeapi
Article #2792form inside a dll loaded by a console application
From: Stefano Bonifazi
Date: Sun, 24 Dec 2006 09:58
Date: Sun, 24 Dec 2006 09:58
30 lines
1989 bytes
1989 bytes
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:
<458e4f48@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,3fa2091e9808a898,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Sun, 24 Dec 2006 10:58:51 +0100 From: Stefano Bonifazi <stefboombastic@email.it> User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: form inside a dll loaded by a console application Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 80.104.235.102 Message-ID: <458e4f48@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1166954312 80.104.235.102 (24 Dec 2006 01:58:32 -0800) Lines: 30 Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail