|
ウィンドウサイズの変更を制限する |
|
void CFooWnd::OnWindowPosChanging(WINDOWPOS* lpwndpos) { // 幅の変更を抑止する(例/クライアントサイズ: 幅768,高さ512まで) CRect rc(0, 0, 768, 512); ::AdjustWindowRectEx(&rc, GetStyle(), BOOL(GetMenu()), GetExStyle()); if (lpwndpos->cx > rc.Width()) lpwndpos->cx = rc.Width(); if (lpwndpos->cy > rc.Height()) lpwndpos->cy = rc.Height(); CWnd::OnWindowPosChanging(lpwndpos); } |