⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 htmlhorizontalrulesection.cpp

📁 hl2 source code. Do not use it illegal.
💻 CPP
字号:
/*----------------------------------------------------------------------
Copyright (c) 1998 Gipsysoft. All Rights Reserved.
Please see the file "licence.txt" for licencing details.

File:	HTMLHorizontalRuleSection.cpp
Owner:	russf@gipsysoft.com
Purpose:	Horizontal rule HTML section.
----------------------------------------------------------------------*/
#include "stdafx.h"
#include "HTMLHorizontalRuleSection.h"


CHTMLHorizontalRuleSection::CHTMLHorizontalRuleSection( CParentSection *psect, bool bNoShade, COLORREF crColor )
	: CHTMLSectionABC( psect )
	, m_bNoShade( bNoShade )
	, m_crColor( crColor )
{
	if( !bNoShade )
	{
		Transparent( true );
	}
}

CHTMLHorizontalRuleSection::~CHTMLHorizontalRuleSection()
{

}


void CHTMLHorizontalRuleSection::OnDraw( CDrawContext &dc )
{
#ifdef DRAW_DEBUG
	CHTMLSectionABC::OnDraw( dc );
#endif	//	DRAW_DEBUG

	if( m_bNoShade )
	{
		dc.FillRect( *this, m_crColor );
	}
	else
	{
		//	REVIEW - russf - bogus bit of OS specific drawing *not* in the right place.
		if( Height() == 2 )
			::DrawEdge( dc.GetSafeHdc(), *this, BDR_SUNKENOUTER, BF_TOP | BF_BOTTOM );
		else
			::DrawEdge( dc.GetSafeHdc(), *this, BDR_SUNKENOUTER, BF_RECT );
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -