WTL中的窗口类

CWindow封装了Windows的大部分API,且CWindows只有一个变量m_hWnd

还有一个类是CWindowImpl,它封装了class registration、 window subclassing、 message maps、和 一个基本的WindowProc()。

The WTL classes can be divided into a few major categories:

  1. Frame window implementation - CFrameWindowImpl, CMDIFrameWindowImpl
  2. Control wrappers - CButton, CListViewCtrl
  3. GDI wrappers - CDC, CMenu
  4. Special UI features - CSplitterWindow, CUpdateUI, CDialogResize, CCustomDraw
  5. Utility classes and macros - CString, CRect, BEGIN_MSG_MAP_EX

 

类的使用

class CMyWindow : public CWindowImpl<CMyWindow, CWindow, CFrameWinTraits>,
                  public CPaintBkgnd<CMyWindow, RGB(0,0,255)> 
posted @ 2009-07-26 18:25  Fan Zhang  阅读(300)  评论(0)    收藏  举报