请问VC中有这个函数吗??
GetTypefaceAtCaret()我在MSDN中没找到,因为我用的是一个精简版本,问下有这个函数吗,如果有,它是什么用的啊
注意搜索撒,百度,google都可以嘛,这里有个英文解释,应该看得懂吧!
GetTypefaceAtCaret is a CStyleBar helper function that retrieves font information from the document or from the view and returns a CString with the typeface name. After GetTypefaceAtCaret returns,CComboBox::SelectString is called to select the corresponding combo box item, and CComboBox::SetCurSel is called with a -1 to blank the visible portion of the combo box if SelectString fails. With this simple update handler in place, the combo box selection will stay in sync with the caret as the user cursors through the document.
应用例子:
CString string = GetTypefaceAtCaret ();
if (m_wndComboBox.SelectString (-1, string) == CB_ERR)
m_wndComboBox.SetCurSel (-1);