CRect desiredRC(0, 0, 800, 600); MoveWindow(desiredRC); CRect rc; GetClientRect(rc); rc.right = desiredRC.right + desiredRC.right - rc.right; rc.bottom = desiredRC.bottom + desiredRC.bottom - rc.bottom; MoveWindow(rc);