初学VC++多媒体编程 也不知道这本书所针对的读者是程序员还是设计师,总之照着上面学吧最开始的是创建一个空的窗口 构造函数是这样写的:
public:
Medium_Frame(){
RECT rect;
Create(NULL,"绘图窗口");
CClientDC dc(this);
int width=dc.GetDeviceCaps(HORZRES);//取得屏幕区的宽
int height=dc.GetDeviceCaps(VERTRES);//取得屏幕区的高
GerWindowRect(&rect);                //取得窗口矩形大小
width=(width-(rect.right-rect.left))/2;//?????????????
height=(height-(rect.bottom-rect.top))/2;//???????????
MoveWindow(width,height,(rect.right -rect.left ),(rect.bottom -rect.top ),true);
};   
请问这两行是什么计算什么?width=(width-(rect.right-rect.left))/2;
height=(height-(rect.bottom-rect.top))/2;
并说明一下,谢谢。