Acquire a View HANDLE :: MFC
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
CFrameWnd::GetActiveView
CFrameWnd::GetActiveDocument
CDocument::GetFirstViewPosition
CDocument::GetNextView
You get the picture.
[ GDNet Start Here | GDNet Search Tool | GDNet FAQ ]
[ MS RTFM [MSDN] | SGI STL Docs | Boost ]
[ Google! | Asking Smart Questions | Jargon File ]
Thanks to Kylotan for the idea!
CFrameWnd::GetActiveDocument
CDocument::GetFirstViewPosition
CDocument::GetNextView
You get the picture.
[ GDNet Start Here | GDNet Search Tool | GDNet FAQ ]
[ MS RTFM [MSDN] | SGI STL Docs | Boost ]
[ Google! | Asking Smart Questions | Jargon File ]
Thanks to Kylotan for the idea!
Sometimes, the Internet is "smaller" as you would think.
Here.
Forever trusting who we are
And nothing else matters - Metallica
Here.
Forever trusting who we are
And nothing else matters - Metallica
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
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
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
Kuphryn
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement