title: Set the size of a window in MFC application
body: <p>This question may be considered as naive for many users but I am new to MFC and I need an indication. I want to set a specific size to a SDI window but I fail to do it. I try the code in the CMainFrame class:</p>
  
  <pre><code>BOOL CMainFrame::PreCreateWindow(CREATESTRUCT&amp; cs)
  {
  if( !CFrameWndEx::PreCreateWindow(cs) )
      return FALSE;
  
   cs.style = WS_OVERLAPPED | WS_SYSMENU | WS_BORDER;
  
   cs.cy = 600; 
   cs.cx = 600; 
   cs.y = ((cs.cy * 3) - cs.cy) / 2; 
   cs.x = ((cs.cx * 3) - cs.cx) / 2;
  
  
   return CFrameWnd::PreCreateWindow(cs); 
  }
  </code></pre>
  
  <p>The window still keeps its size though without any change.</p>
  
  <p>As far as I am concerned, I can override the respective function in CWnd class to get to the same result. Given that I have not used the CWnd class till now in my program, how can I do that? </p>