Getting parent window reference

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rudy

    #1

    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
  • Dmitriy Lapshin [C# / .NET MVP]

    #2
    Re: Getting parent window reference

    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

    Bring the power of unit testing to VS .NET IDE

    "Rudy" <R.Rutkowski@el ka.pw.edu.pl> wrote in message
    news:bkqe4l$192 j$1@foka1.acn.p l...[color=blue]
    > 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[/color]

    Comment

    Working...