重载OnNcPaint...CWnd::OnNcPaint  
afx_msg void OnNcPaint( );ResThe framework calls this member function when the nonclient area needs to be painted. The default implementation paints the window frame. An application can override this call and paint its own custom window frame. The clipping region is always rectangular, even if the shape of the frame is altered.

解决方案 »

  1.   

    我用了OnNcpaint();但是会出现很多问题啊,把边框都破坏了,
    而且改变大小时也有问题出现!
    有什么好的例子看看吗
      

  2.   

    重栽 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);