This topic has been archived. It cannot be replied.
-
工作学习 / IT杂谈 / 请教各位VC++高手,现在用VC++画了一个窗口,如何能够设置窗口中工作区的大小,比如设置成200*200?谢谢!
-guest:;
2001-9-8
(#193878@0)
-
up!
-guest:;
2001-9-8
(#193901@0)
-
up again!
-guest:;
2001-9-8
(#194004@0)
-
CMainFrame::PreCreateWindow(){cs.cx=200;cs.cy=200;...}
-guest:;
2001-9-8
(#194007@0)
-
非常感谢!但是cs好象是设置窗口的大小,那么应该包括工具栏在内。那么能否设置工作区大小,只是窗口中空白的那一部份。谢谢。
-guest:;
2001-9-8
(#194010@0)
-
something like:CMainFrame::OnCreate(){
:
static RECT rc;
rc.left=rc.top=0;
rc.right=rc.bottom=200;
AdjustWindowRect(&rc, WS_CAPTION|WS_SYSMENU, TRUE);
CWnd::SetWindowPos(NULL, 0, 0, rc.right-rc.left, rc.bottom-rc.top, SWP_NOMOVE);
return 0;
}
-guest:;
2001-9-9
{240}
(#194626@0)
-
我试验了一下,您的程序是包括了边框。我是想在工作区内建立一个200*200的绘图区(不包括边框)。请问该怎么做?非常谢谢!
-guest:;
2001-9-9
(#194701@0)
-
Call GetSystemMetrix() to get window's caption size and window's border thickness, then it is easy to calculate the window size to create.
-guest:harvey;
2001-9-10
(#196430@0)