GetUserDictionarySection Example for C++ 5.0 and later
void CSample_COMDlg::OnButton32()
{
CString csMsg;
csMsg.Format (TEXT("User Dictionary Name = %s\nDefault Section Name = %s\n"),
pRasterDoc->DictionaryFileName,
pRasterDoc->DictionaryDefaultSection);
AfxMessageBox(csMsg);
BOOL bState = pRasterDoc->DictionaryState;
if (bState) //Make sure that the True vaue is 1
AfxMessageBox(TEXT("The current user dictionary is changed."));
else
AfxMessageBox(TEXT("The current user dictionary is not changed."));
CString csSection = (LPCTSTR)pRasterDoc->GetUserDictionarySection (SECTION_NAME_LENGTH, TRUE);
csMsg.Format (TEXT("First Section in the current User Dictionray = %s\n"), (LPCTSTR)csSection);
AfxMessageBox(csMsg);
CString csSectionItem = (LPCTSTR)pRasterDoc->GetUserDictionarySectionItem((LPCTSTR)csSection, 512, TRUE);
csMsg.Format (TEXT("1st Section Item in the 1st section of the current User Dictionray = %s"), (LPCTSTR)csSectionItem);
AfxMessageBox(csMsg);
}