本文整理汇总了C++中CDocument::GetCodePage方法的典型用法代码示例。如果您正苦于以下问题:C++ CDocument::GetCodePage方法的具体用法?C++ CDocument::GetCodePage怎么用?C++ CDocument::GetCodePage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDocument
的用法示例。
在下文中一共展示了CDocument::GetCodePage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ApplyDefaultFormat
//.........这里部分代码省略.........
pCFI->_pf()._cuvOffsetPoints.SetPoints(LIST_FIRST_REDUCTION_POINTS);
pCFI->_pf()._cuvNonBulletIndentPoints.SetPoints(
pCFI->_pf()._cuvNonBulletIndentPoints.GetPoints()+BLOCKQUOTE_INDENT_POINTS);
pCFI->UnprepareForDebug();
break;
case ETAG_CENTER:
pCFI->_bBlockAlign = (BYTE) htmlBlockAlignCenter;
pCFI->_bCtrlBlockAlign = (BYTE) htmlBlockAlignCenter;
break;
case ETAG_LISTING:
// NB (cthrash) Inside a listing, we drop the font size by 2.
// We drop it by one here, and then set BUMPSIZEDOWN on
// to drop another.
pCFI->PrepareCharFormat();
pCFI->_cf().ChangeHeightRelative(-1);
pCFI->UnprepareForDebug();
case ETAG_XMP:
case ETAG_PRE:
case ETAG_PLAINTEXT:
pCFI->PrepareParaFormat();
pCFI->_pf()._fTabStops = TRUE;
pCFI->UnprepareForDebug();
pCFI->_fPre = TRUE;
pCFI->_fInclEOLWhite = TRUE;
pCFI->_fNoBreak = TRUE;
pCFI->PrepareCharFormat();
pCFI->_cf()._fBumpSizeDown = TRUE;
pCFI->UnprepareForDebug();
// Netscape puts a lot of space between PLAINTEXT and the preceeding lines.
if(Tag() == ETAG_PLAINTEXT)
{
if(!pCFI->_pff->_fExplicitTopMargin)
{
pCFI->PrepareFancyFormat();
pCFI->_ff()._cuvSpaceBefore.SetPoints(26);
pCFI->UnprepareForDebug();
}
if(!pCFI->_pff->_fExplicitBottomMargin)
{
pCFI->PrepareFancyFormat();
pCFI->_ff()._cuvSpaceAfter.SetPoints(26);
pCFI->UnprepareForDebug();
}
}
else
{
pCFI->PrepareFancyFormat();
ApplyDefaultVerticalSpace(&pCFI->_ff());
pCFI->UnprepareForDebug();
}
{
pCFI->PrepareCharFormat();
CODEPAGESETTINGS* pCS = pDoc->_pCodepageSettings;
// Thai does not have a fixed pitch font. Leave it as proportional
if(pDoc->GetCodePage() != CP_THAI)
{
pCFI->_cf()._bPitchAndFamily = FIXED_PITCH;
pCFI->_cf()._latmFaceName = pCS->latmFixedFontFace;
}
pCFI->_cf()._bCharSet = pCS->bCharSet;
pCFI->_cf()._fNarrow = IsNarrowCharSet(pCFI->_cf()._bCharSet);
pCFI->UnprepareForDebug();
}
break;
}
// we need to call super AFTER the above code, because this is where in-linestyles get
// applied. by calling super first we overwrote explicitly set values (e.g. margin-top)
hr = super::ApplyDefaultFormat(pCFI);
if(hr)
{
goto Cleanup;
}
// set up for potential EM, EN, ES converstions
lFontHeightTwips = pCFI->_pcf->GetHeightInTwips(pDoc);
if(lFontHeightTwips <= 0)
{
lFontHeightTwips = 1;
}
if(pCFI->_ppf->_lFontHeightTwips != lFontHeightTwips)
{
pCFI->PrepareParaFormat();
pCFI->_pf()._lFontHeightTwips = lFontHeightTwips;
pCFI->UnprepareForDebug();
}
Cleanup:
RRETURN(hr);
}