Aracılığıyla paylaş


CWnd::SetCaretPos

Şapka konumunu ayarlar.

static void PASCAL SetCaretPos(
   POINT point 
);

Parametreler

  • point
    Belirtir yeni x ve y koordinatlarını şapka (istemci koordinatlarında).

Notlar

SetCaretPos Üye işlevi, yalnızca geçerli görev penceresinde tarafından sahiplenilir, şapka taşır.SetCaretPosşapka gizli olup olmadığına bakılmaksızın şapka taşır.

Şapka paylaşılan bir kaynaktır.Şapka sahibi değil, bir pencereyi klavyeyle taşımamalısınız.

Örnek

// The following code snippet shows a caret when the left 
// mouse button is pressed, and sets the caret's positon to 
// the cursor's position.
void CMyView::OnLButtonDown(UINT nFlags, CPoint point) 
{
   //create a solid caret, the width is 2, the length is 20.
   CreateSolidCaret(2, 20);

   SetCaretPos(point);
   ShowCaret();

   CView::OnLButtonDown(nFlags, point);
}

Gereksinimler

Başlık: afxwin.h

Ayrıca bkz.

Başvuru

CWnd Sınıfı

Hiyerarşi grafik

CWnd::GetCaretPos

SetCaretPos