AnnContainer example for C++ 5.0 and later

//This sample is from the COM MFC ODBC database sample program
//For more information, see the examples/com/Msvc5/db folder
void CLtcdbView::InitAnnotation()
{
   CLtcdbApp * pTheApp = (CLtcdbApp * )AfxGetApp();
   CLEADRaster LTRas = m_RasterView.GetRaster();

   short iRet = LTRas.CreateBitmap(1, 1, 1);
   LTRas.SetScaleMode(SCALEMODE_PIXEL);

   IDispatch *pDispatch=NULL;
   (m_RasterView.GetControlUnknown())->QueryInterface(IID_IDispatch, (void**)&pDispatch);

   pTheApp->m_pRasterAnn->PutAnnParentRasterView(pDispatch);
   pTheApp->m_pRasterODBC->PutAnnContainer(pTheApp->m_pRasterAnn->GetAnnContainer());
   if(pDispatch)
      pDispatch->Release();
   pTheApp->m_pRasterAnn->PutAnnUserMode(ANN_USERMODE_DESIGN);
   pTheApp->m_pRasterAnn->PutAnnTool(ANN_TOOL_SELECT);
}