fillsolidrect_onerasebkgnd 重影_bitblt函数(27)

电脑杂谈  发布时间:2017-03-10 14:21:13  来源:网络整理

{

arrSCBars.RemoveAll();

int nFirstT, nLastT, nThisT;

GetRowInfo(nFirstT, nLastT, nThisT);

nThis = -1;

for (int i = nFirstT; i <= nLastT; i++)

{

CSizingControlBar* pBar =

(CSizingControlBar*) m_pDockBar->m_arrBars[i];

if (HIWORD(pBar) == 0) continue; // placeholder

if (!pBar->IsVisible()) continue;

if (pBar->IsKindOf(RUNTIME_CLASS(CSizingControlBar)))

{

if (pBar == this)

nThis = arrSCBars.GetSize();

arrSCBars.Add(pBar);

}

}

}

BOOL CSizingControlBar::NegotiateSpace(int nLengthTotal, BOOL bHorz)

{

ASSERT(bHorz == IsHorzDocked());

int nFirst, nLast, nThis;

GetRowInfo(nFirst, nLast, nThis);

int nLengthAvail = nLengthTotal;

int nLengthActual = 0;

int nLengthMin = 2;

int nWidthMax = 0;

CSizingControlBar* pBar;

for (int i = nFirst; i <= nLast; i++)

{

pBar = (CSizingControlBar*) m_pDockBar->m_arrBars[i];

if (HIWORD(pBar) == 0) continue; // placeholder

if (!pBar->IsVisible()) continue;

BOOL bIsSizingBar =

pBar->IsKindOf(RUNTIME_CLASS(CSizingControlBar));

int nLengthBar; // minimum length of the bar

if (bIsSizingBar)

nLengthBar = bHorz ? pBar->m_szMinHorz.cx - 2 :

pBar->m_szMinVert.cy - 2;

else

{

CRect rcBar;

pBar->GetWindowRect(&rcBar);

nLengthBar = bHorz ? rcBar.Width() - 2 : rcBar.Height() - 2;

}

nLengthMin += nLengthBar;

if (nLengthMin > nLengthTotal)

{

// split the row after fixed bar

if (i < nThis)

{

m_pDockBar->m_arrBars.InsertAt(i + 1,

(CControlBar*) NULL);

return FALSE;

}

// only this sizebar remains on the row, adjust it to minsize


本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/jisuanjixue/article-36846-27.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...