HCURSOR LoadCursor(
  HINSTANCE hInstance,  // handle to application instance
  LPCTSTR lpCursorName  // name or resource identifier
);HCURSOR SetCursor(
  HCURSOR hCursor   // handle to cursor
);int ShowCursor(
  BOOL bShow   // cursor visibility
);

解决方案 »

  1.   

    HCURSOR LoadCursor(
      HINSTANCE hInstance,  // handle to application instance
      LPCTSTR lpCursorName  // name or resource identifier
    );HCURSOR SetCursor(
      HCURSOR hCursor   // handle to cursor
    );int ShowCursor(
      BOOL bShow   // cursor visibility
    );
      

  2.   

    CLSID const& GetClsid()
    {
    static CLSID const clsid
    = { 0xd27cdb6e, 0xae6d, 0x11cf, { 0x96, 0xb8, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0 } };
    return clsid;
    }
    virtual BOOL Create(LPCTSTR lpszClassName,
    LPCTSTR lpszWindowName, DWORD dwStyle,
    const RECT& rect,
    CWnd* pParentWnd, UINT nID,
    CCreateContext* pContext = NULL)
    { return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID); } BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle,
    const RECT& rect, CWnd* pParentWnd, UINT nID,
    CFile* pPersist = NULL, BOOL bStorage = FALSE,
    BSTR bstrLicKey = NULL)
    { return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID,
    pPersist, bStorage, bstrLicKey); }这个就是利用gallery生成的类一部分,第一个Create()函数提供了一个lpcsClassname参数,我使用这个函数来创建控件,提供了自己的class(使用AfxRegisterClass()),很可惜,正如我所料,没有效果(光标,画刷都没有变化),因为上面的两个Create()都使用了同一个CreateControl()函数,lpszClassName参数是被忽略的。