mainform = new TForm3( Madkernel::CurrentProcess()->...

just write whatever you want
Post Reply
Teerayoot
Posts: 10
Joined: Tue May 18, 2004 5:04 pm

mainform = new TForm3( Madkernel::CurrentProcess()->...

Post by Teerayoot »

How to solve this ploblem.
mainform = new TForm3( Madkernel::CurrentProcess()->GetWindows()->operator [](0)->Handle);
Error windows...
[C++ Error] Unit3.cpp( 3 8 ) : E2285 Could not find a match for 'TForm3::TForm3(unsigned int)'

As bcb help said,we can pass windows handle as parent window,but he coun't find match.
Any help?
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

IWindow->Handle returns an IHandle interface, not a dword handle. If you need the dword handle you need to use IHandle->Handle, that is IWindow->Handle->Handle.

Btw, instead of "GetWindows()->operator [](0)" I think you can do "GetWindows()->Items[0]". Looks nicer to my eyes.

P.S: Why don't you use Application->Handle instead? Shouldn't that give you the same handle as GetWindows()->Items[0]?
Post Reply