只须拦截WM_WINDOWPOSCHANGING消息,并对其做如下修改即可
void
CMainFrame::OnWindowPosChanging(WINDOWPOS
*
lpwndpos)
{
lpwndpos -> flags |= SWP_NOMOVE | SWP_NOSIZE;
CFrameWnd::OnWindowPosChanging(lpwndpos);
}
{
lpwndpos -> flags |= SWP_NOMOVE | SWP_NOSIZE;
CFrameWnd::OnWindowPosChanging(lpwndpos);
}