fillsolidrect_onerasebkgnd 重影_bitblt函数(7)

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

if (rc.PtInRect(point))

return HTCLOSE;

return HTCLIENT;

}

/////////////////////////////////////////////////////////////////////////

// CCoolBar implementation helpers

void CCoolBar::OnUpdateCmdUI(CFrameWnd* pTarget,

BOOL bDisableIfNoHndler)

{

UNUSED_ALWAYS(bDisableIfNoHndler);

UNUSED_ALWAYS(pTarget);

if (!HasGripper())

return;

BOOL bNeedPaint = FALSE;

CPoint pt;

::GetCursorPos(&pt);

BOOL bHit = (OnNcHitTest(pt) == HTCLOSE);

BOOL bLButtonDown = (::GetKeyState(VK_LBUTTON) < 0);

BOOL bWasPushed = m_biHide.bPushed;

m_biHide.bPushed = bHit && bLButtonDown;

BOOL bWasRaised = m_biHide.bRaised;

m_biHide.bRaised = bHit && !bLButtonDown;

CWnd* pFocus = GetFocus();

BOOL bActiveOld = m_bActive;

m_bActive = (pFocus->GetSafeHwnd() && IsChild(pFocus));

if (m_bActive != bActiveOld)

bNeedPaint = TRUE;

bNeedPaint |= (m_biHide.bPushed ^ bWasPushed) ||

(m_biHide.bRaised ^ bWasRaised);

if (bNeedPaint)

SendMessage(WM_NCPAINT);

}

/////////////////////////////////////////////////////////////////////////

// CSCBButton

CSCBButton::CSCBButton()

{

bRaised = FALSE;

bPushed = FALSE;

}

void CSCBButton::Paint(CDC* pDC)

{

CRect rc = GetRect();

if (bPushed)

pDC->Draw3dRect(rc, ::GetSysColor(COLOR_BTNSHADOW),

::GetSysColor(COLOR_BTNHIGHLIGHT));

else

if (bRaised)

pDC->Draw3dRect(rc, ::GetSysColor(COLOR_BTNHIGHLIGHT),

::GetSysColor(COLOR_BTNSHADOW));

COLORREF clrOldTextColor = pDC->GetTextColor();

pDC->SetTextColor(::GetSysColor(COLOR_BTNTEXT));

int nPrevBkMode = pDC->SetBkMode(TRANSPARENT);


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

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

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