This example determines the name of the Container object to which a Document object belongs.
CString strContainer;
strContainer = docUnknown.GetContainer();
if (strcmp(strContainer, _T("Tables")) == 0)
{
//...
return;
}
if (strcmp(strContainer, _T("Databases")) == 0)
{
//...
return;
}
if (strcmp(strContainer, _T("Forms")) == 0)
{
//...
return;
}
//...