int CTextView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CView::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
CClientDC dc(this);
TEXTMETRIC tm;
dc.GetTextMetrics(&tm);
//CreateSolidCaret(tm.tmAveCharWidth/8,tm.tmHeight);
//ShowCaret();
CBitmap bm;
bm.LoadBitmap(IDB_BITMAP1);
CreateCaret(&bm);
ShowCaret();
return 0;
}
这是在窗口创建一个插入符,为什么用固定插入符CreateSolidCaret()可以在窗口显示插入符,而用位图却无法显示该位图插入符?