HCURSOR SetCursor(
  HCURSOR hCursor   // handle to cursor
);

解决方案 »

  1.   

    最好在OnSetCursor中设置光标,这样可以避免光标的闪烁
      

  2.   

    比如:::SetCursor(::LoadCursor(NULL,IDC_CROSS))
      

  3.   

    用这个
    CreateCaret
    The CreateCaret function creates a new shape for the system caret and assigns ownership of the caret to the specified window. The caret shape can be a line, a block, or a bitmap. BOOL CreateCaret(
      HWND hWnd,        // handle to owner window
      HBITMAP hBitmap,  // handle to bitmap for caret shape
      int nWidth,       // caret width
      int nHeight       // caret height
    );
    Parameters
    hWnd 
    [in] Handle to the window that owns the caret. 
    hBitmap 
    [in] Handle to the bitmap that defines the caret shape. If this parameter is NULL, the caret is solid. If this parameter is (HBITMAP) 1, the caret is gray. If this parameter is a bitmap handle, the caret is the specified bitmap. The bitmap handle must have been created by the CreateBitmap, CreateDIBitmap, or LoadBitmap function. 
    If hBitmap is a bitmap handle, CreateCaret ignores the nWidth and nHeight parameters; the bitmap defines its own width and height. nWidth 
    [in] Specifies the width of the caret in logical units. If this parameter is zero, the width is set to the system-defined window border width. If hBitmap is a bitmap handle, CreateCaret ignores this parameter. 
    nHeight 
    [in] Specifies the height, in logical units, of the caret. If this parameter is zero, the height is set to the system-defined window border height. If hBitmap is a bitmap handle, CreateCaret ignores this parameter. 
      

  4.   

    MFC 的 Document/View 结构中的 Document 与显示无关,为什么要在 Document 中设置光标?
    另:你是指光标还是鼠标指针?
      

  5.   

    谢谢,我已经解决了。
    用CreateSolidCaret就可以了。