AnnToolChecked example for C++ 5.0 and later
For details on event handling of the COM objects in MFC, and m_pDlg and m_pRasterAnn declarations, refer to the "Creating and Using Annotations (C++ 5.0 and later) Tutorial"
//This event is fired when the user clicks on an annotation toolbar button.
//
//For details on event handling of the COM objects in MFC,
// and m_pDlg and m_pRasterAnn delcarations, refer to
// the "Creating and Using Annotations (C++ 5.0 and later) Tutorial"
void CRasterAnnSink::OnAnnToolChecked(short iTool)
{
CString strMsg;
switch(iTool)
{
case ANN_TOOL_SELECT:
strMsg = TEXT("Selection pointer tool");
break;
case ANN_TOOL_LINE:
strMsg = TEXT("Line tool");
break;
case ANN_TOOL_RECT:
strMsg = TEXT("Rectangle tool");
break;
case ANN_TOOL_ELLIPSE:
strMsg = TEXT("Ellipse tool");
break;
//...
//...
//...
default:
strMsg = TEXT("User defined tool");
break;
}
AfxMessageBox(strMsg);
}