471,092 Members | 1,107 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,092 software developers and data experts.

Getting parent window reference

Hi
Is there a way is a 'class library' to get the reference to window of
application that uses the library ?

I'm using class library to create a custom command for a closed source
application (GeoMedia), so obviously I can't make it to pass this
reference to my lib as a method parameter.

--
Rudy
Nov 15 '05 #1
1 5378
Hi Rudy,

I think calling WinAPI functions like FindWindow through P/Invoke might
help. But there are lots of potential caveats - the parent window might be
owned by another thread, for example. I think there is good reason why the
window handle is not given to custom commands. I'd still, however, suggest
referring to the GeoMedia manual - I hope they should have said something
about that there.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Rudy" <R.*********@elka.pw.edu.pl> wrote in message
news:bk***********@foka1.acn.pl...
Hi
Is there a way is a 'class library' to get the reference to window of
application that uses the library ?

I'm using class library to create a custom command for a closed source
application (GeoMedia), so obviously I can't make it to pass this
reference to my lib as a method parameter.

--
Rudy


Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by JJ | last post: by
5 posts views Thread by midnight_use_only | last post: by
4 posts views Thread by Ravi Kishore | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.