本文整理汇总了C++中CTreeNode::GetCascadedoverflowY方法的典型用法代码示例。如果您正苦于以下问题:C++ CTreeNode::GetCascadedoverflowY方法的具体用法?C++ CTreeNode::GetCascadedoverflowY怎么用?C++ CTreeNode::GetCascadedoverflowY使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTreeNode
的用法示例。
在下文中一共展示了CTreeNode::GetCascadedoverflowY方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CalcSizeHelper
//+-------------------------------------------------------------------------
//
// Method: CRichtextLayout::CalcSizeHelper
//
// Synopsis: Calculate the size of the object
//
//--------------------------------------------------------------------------
DWORD CRichtextLayout::CalcSizeHelper(CCalcInfo* pci, int charX, int charY, SIZE* psize)
{
CSize sizeOriginal;
DWORD grfReturn;
CElement* pInput = ElementOwner();
GetSize(&sizeOriginal);
//BUGBUG (gideons) should modify Cols and Rows if user resizes
grfReturn = (pci->_grfLayout & LAYOUT_FORCE);
CTreeNode* pTreeNode = pInput->GetFirstBranch();
CUnitValue uvWidth = pTreeNode->GetCascadedwidth();
CUnitValue uvHeight = pTreeNode->GetCascadedheight();
BOOL fMinMax = (pci->_smMode==SIZEMODE_MMWIDTH || pci->_smMode==SIZEMODE_MINWIDTH);
if(uvWidth.IsNullOrEnum() || uvHeight.IsNullOrEnum())
{
SIZE sizeFontForShortStr;
SIZE sizeFontForLongStr;
styleOverflow overflow;
GetFontSize(pci, &sizeFontForShortStr, &sizeFontForLongStr);
Assert(sizeFontForShortStr.cx && sizeFontForShortStr.cy && sizeFontForLongStr.cx && sizeFontForLongStr.cy);
// BUGBUG: The TEXT_INSET_DEFAULT_xxxx values are really padding and should be handled as such (brendand)
psize->cx = charX * sizeFontForLongStr.cx
+ pci->DocPixelsFromWindowX(TEXT_INSET_DEFAULT_LEFT
+ TEXT_INSET_DEFAULT_RIGHT
+ GetDisplay()->GetCaret());
psize->cy = charY * sizeFontForLongStr.cy
+ pci->DocPixelsFromWindowY(TEXT_INSET_DEFAULT_TOP
+ TEXT_INSET_DEFAULT_BOTTOM
+ 0);
// BUGBUG: Add this space in another way? (brendand)
overflow = pTreeNode->GetCascadedoverflowY();
if(overflow != styleOverflowHidden)
{
psize->cx += _afxGlobalData._sizeScrollbar.cx;
if(!IsWrapSet())
{
psize->cy += _afxGlobalData._sizeScrollbar.cy;
}
}
AdjustSizeForBorder(psize, pci, TRUE);
}
if(!uvWidth.IsNullOrEnum())
{
psize->cx = (!fMinMax || !PercentWidth() ?
uvWidth.XGetPixelValue(pci,
pci->_sizeParent.cx,
pInput->GetFirstBranch()->GetFontHeightInTwips(&uvWidth))
: 0);
}
if(!uvHeight.IsNullOrEnum())
{
psize->cy = (pci->_smMode==SIZEMODE_MMWIDTH
? psize->cx
: (!fMinMax || !PercentHeight()
? uvHeight.YGetPixelValue(pci,
pci->_sizeParent.cy,
pInput->GetFirstBranch()->GetFontHeightInTwips(&uvHeight))
: 0));
}
if(pci->_smMode == SIZEMODE_MMWIDTH)
{
_xMax = psize->cx;
_xMin = psize->cx;
_fMinMaxValid = TRUE;
}
else if(pci->_smMode == SIZEMODE_MINWIDTH)
{
_xMin = psize->cx;
}
return grfReturn;
}