• Advertisement

Archived

This topic is now archived and is closed to further replies.

Acquire a View HANDLE :: MFC

This topic is 5771 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. I often see function parameters requiring a handle to a window. I believe the handle to main fram is m_hWnd. In general, how do you get a handle to a window from main frame to any view including splitters? Thanks, Kuphryn

Share this post


Link to post
Share on other sites
Advertisement
Thanks.

A member at CodeProject mentioned using IsWindow() to make sure a handle is a handle to a valid window. However, IsWindow() take not parameters and returns a BOOL. I am not sure how to "check" a handle using that function.

Kuphryn

Share this post


Link to post
Share on other sites
To clarify any confusions, the reason I am asking about HANDLE to MFC windows is, as a member at Anandtech mentioned, I need to pass it to API functions especially winsock. I am shifting gear to network programming in Windows.

Kuphryn

Share this post


Link to post
Share on other sites
quote:
Original post by kuphryn
A member at CodeProject mentioned using IsWindow() to make sure a handle is a handle to a valid window. However, IsWindow() take not parameters and returns a BOOL. I am not sure how to "check" a handle using that function.



::IsWindow takes an HWND. CWnd has a member m_hWnd that holds its HWND.

Share this post


Link to post
Share on other sites
Ahhhh. Thanks.

Sometimes Visual C++ help is not as effective as real real people.

Kuphryn

Share this post


Link to post
Share on other sites

  • Advertisement