1

 SetWindowPos(NULL,0,0,200,300,SWP_NOMOVE);  
  表示不考虑(0,0),仅仅将大小改为200x300,位置不变  
  SetWindowPos(NULL,0,0,200,300,SWP_NOMOVE);  
  表示不考虑200X300,只是把位置挪到(0,0).大小不变  
  如果想同时改变,最后可用SWP_NOZORDER等  
  参数中还有SWP_SHOWWINDOW   显示窗口   对应的SWP_HIDEWINDOW  

 

2

BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
 if( !CFrameWnd::PreCreateWindow(cs) )
  return FALSE;
 // TODO: Modify the Window class or styles here by modifying
 //  the CREATESTRUCT cs

 cs.x = 0;
 cs.y = 0;     //设置初始位置

 cs.cx = 1000;
 cs.cy = 700;    //设置大小

 return TRUE;
}

posted on 2010-08-06 10:31  朱超  阅读(239)  评论(0编辑  收藏  举报