int scx = ::GetSystemMetrics(SM_CXSCREEN);
int scy = ::GetSystemMetrics(SM_CYSCREEN);
CRect myrect;
GetWindowRect(&myrect);
int fromx = (scx - myrect.Width())/2;
int fromy = (scy - myrect.Height())/2;
SetWindowPos(NULL,fromx,fromy,myrect.Width(),myrect.Height(),SWP_NOZORDER);
请描述其作用,你觉得这段程序在方式、效率上是否能进行提高,如果能,请说明方法。
参考答案