CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 1999
    Location
    Haddonfield, NJ (South Jersey)
    Posts
    84

    How to obtain HINSTANCE using HWND?

    is there a way to obtain HINSTANCE handle using only windows HWND? I am at a loss here...

    --maciej



  2. #2
    Join Date
    Jun 1999
    Posts
    24

    Re: How to obtain HINSTANCE using HWND?

    GetWindowLong(hWnd, GWL_HINSTANCE)

    should return you the app instance associated with the window.


  3. #3
    Guest

    Re: How to obtain HINSTANCE using HWND?

    Is it MFC app?
    if it is simple: AfxGetInstanceHandle will do.

    Powodzenia


  4. #4
    Join Date
    Nov 1999
    Location
    Haddonfield, NJ (South Jersey)
    Posts
    84

    Re: How to obtain HINSTANCE using HWND?

    Dzieki za odpowiedz, but AfxGetInstanceHandle() only works with the current window and I only have other windows hwnd.

    GetWindowLong() does it. Thanks Rajeev!
    Na razie!



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured