Andrew
2006-09-13 14:52:01 UTC
Hi,
I'm writing a MFC doc/view application and try to retrieve the window frame
info. So I called GetWindowInfo() within the view object. The compilation
was ok but I got exception at runtime. Here is my code:
void CMyAppView::OnInitialUpdate( )
{
PWINDOWINFO p;
::memset (&p, 0, sizeof (p) );
GetParentFrame()->GetWindowInfo(p);
}
And the runtime exception occurs at afxwin4.inl, where CWnd::GetWindowInfo()
is defined:
AFX_INLINE BOOL CWnd::GetWindowInfo(PWINDOWINFO pwi) const
{ ASSERT(::IsWindow(m_hWnd)); return ::GetWindowInfo(m_hWnd, pwi); }
I really can't figure out what went wrong. Please HELP!
Thank you.
Andrew
I'm writing a MFC doc/view application and try to retrieve the window frame
info. So I called GetWindowInfo() within the view object. The compilation
was ok but I got exception at runtime. Here is my code:
void CMyAppView::OnInitialUpdate( )
{
PWINDOWINFO p;
::memset (&p, 0, sizeof (p) );
GetParentFrame()->GetWindowInfo(p);
}
And the runtime exception occurs at afxwin4.inl, where CWnd::GetWindowInfo()
is defined:
AFX_INLINE BOOL CWnd::GetWindowInfo(PWINDOWINFO pwi) const
{ ASSERT(::IsWindow(m_hWnd)); return ::GetWindowInfo(m_hWnd, pwi); }
I really can't figure out what went wrong. Please HELP!
Thank you.
Andrew