如何改变窗口的 缺省风格?

解决方案 »

  1.   

    重栽 CWnd:: PreCreateWindow 并修改CREATESTRUCT结构来指定窗口风格和其他
         创建信息.
         Example: Delete "Max" Button and Set Original Window's Position and Size      BOOL CMainFrame::  PreCreateWindow (CREATESTRUCT &cs)
          {
           cs.style &=~WS_MAXINIZEMOX;
                                                                                  
           cs.x=cs.y=0;
           cs.cx=GetSystemMetrics(SM_CXSCREEN/2);
           cs.cy=GetSystemMetrics(SM_CYSCREEN/2);        return CMDIFramewnd ::PreCreateWindow(cs);      }