Archived

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

kuphryn

Acquire a View HANDLE :: MFC

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
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