Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2007 Feb : Finding the main window window in current thread

www.cryer.info
Managed Newsgroup Archive

Finding the main window window in current thread

Subject:Finding the main window window in current thread
Posted by:"MyRealName" (myreal_na..@hotmail.com)
Date:Sun, 25 Feb 2007 09:15:12

HI there,

until now i used some sort of FindWindow to get the handle of my
application, wich I need to initialize some self-written components. But
know I found out the hard way, that it fails if you write the 2nd
application using these components, just because the ClassName is different.
And I cannot make it the same, bc latest when both apps are running the same
time, I could find the wrong window ;) Also I really don't want to deliver 2
different bpl's or read from INI files or registry, since those components
are often needed within the application.

So is there any way to find the main window of the own thread to receive
with GetWindowLong the Userdata I attached to that window?

Thanks for your help in adavance...

Replies:

www.cryer.info
Managed Newsgroup Archive