我用 写了一个类 继承 Cstatic
我在 OnSize 里面调用 GetClientRect() 出错,大家看看是什么问题?
CRect rc;
m_MyPanel.GetClientRect(&rc);错误:
_AFXWIN_INLINE void CWnd::GetClientRect(LPRECT lpRect) const
{ ASSERT(::IsWindow(m_hWnd)); ::GetClientRect(m_hWnd, lpRect); }
我在 OnSize 里面调用 GetClientRect() 出错,大家看看是什么问题?
CRect rc;
m_MyPanel.GetClientRect(&rc);错误:
_AFXWIN_INLINE void CWnd::GetClientRect(LPRECT lpRect) const
{ ASSERT(::IsWindow(m_hWnd)); ::GetClientRect(m_hWnd, lpRect); }
第一次执行OnSize时,m_hWnd是空的。
m_MyPanel.GetClientRect(&rc);