Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想根据 SDI 框架中主机的大小来设置视图的大小。也就是说当我改变大型机的大小时,视图的大小也会随之改变,客户区也随之改变。我怎样才能做到这一点?
谢谢
只需添加一个OnSize方法来处理视图的大小:
void CMyFrame::OnSize(UINT nType, int cx, int cy) { m_MyView.SetWindowPos(NULL, 0, 0, cx, cy, SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER); }