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

📄 subject_15883.htm

📁 一些关于vc的问答
💻 HTM
字号:
<p>
序号:15883 发表者:笨鸟 发表日期:2002-09-23 14:44:20
<br>主题:怎样创建Brush?
<br>内容:怎样创建CROSS类型的Brush?<BR>要求其中有三条横线比别的横线粗!
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:Aikoc 回复日期:2002-09-23 16:52:10
<br>内容:&nbsp;&nbsp;<BR>&nbsp;&nbsp;Platform SDK: Windows GDI <BR>CreateHatchBrush<BR>The CreateHatchBrush function creates a logical brush that has the specified hatch pattern and color. <BR><BR>HBRUSH CreateHatchBrush(<BR>&nbsp;&nbsp;int fnStyle,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// hatch style<BR>&nbsp;&nbsp;COLORREF clrref&nbsp;&nbsp; // foreground color<BR>);<BR>Parameters<BR>fnStyle <BR>[in] Specifies the hatch style of the brush. This parameter can be one of the following values. Value Meaning <BR>HS_BDIAGONAL 45-degree downward left-to-right hatch <BR>HS_CROSS Horizontal and vertical crosshatch <BR>HS_DIAGCROSS 45-degree crosshatch <BR>HS_FDIAGONAL 45-degree upward left-to-right hatch <BR>HS_HORIZONTAL Horizontal hatch <BR>HS_VERTICAL Vertical hatch <BR><BR><BR>clrref <BR>[in] Specifies the foreground color of the brush that is used for the hatches. To create a COLORREF color value, use the RGB macro. <BR>Return Values<BR>If the function succeeds, the return value identifies a logical brush.<BR><BR>If the function fails, the return value is NULL. <BR><BR>Windows NT/ 2000: To get extended error information, call GetLastError.<BR><BR>Remarks<BR>A brush is a bitmap that the system uses to paint the interiors of filled shapes. <BR><BR>After an application creates a brush by calling CreateHatchBrush, it can select that brush into any device context by calling the SelectObject function. <BR><BR>If an application uses a hatch brush to fill the backgrounds of both a parent and a child window with matching color, it may be necessary to set the brush origin before painting the background of the child window. You can do this by having your application call the SetBrushOrgEx function. Your application can retrieve the current brush origin by calling the GetBrushOrgEx function. <BR><BR>When you no longer need the brush, call the DeleteObject function to delete it. <BR><BR>ICM: No color is done at brush creation. However, color management is performed when the brush is selected into an ICM-enabled device context. <BR><BR>Requirements <BR>&nbsp;&nbsp;Windows NT/2000: Requires Windows NT 3.1 or later.<BR>&nbsp;&nbsp;Windows 95/98: Requires Windows 95 or later.<BR>&nbsp;&nbsp;Header: Declared in Wingdi.h; include Windows.h.<BR>&nbsp;&nbsp;Library: Use Gdi32.lib.<BR><BR>See Also<BR>Brushes Overview, Brush Functions, CreateDIBPatternBrush, CreateDIBPatternBrushPt, CreatePatternBrush, CreateSolidBrush, DeleteObject, GetBrushOrgEx, SelectObject, SetBrushOrgEx, COLORREF, RGB<BR><BR>Built on Thursday, May 11, 2000Requirements <BR>&nbsp;&nbsp;Windows NT/2000: Requires Windows NT 3.1 or later.<BR>&nbsp;&nbsp;Windows 95/98: Requires Windows 95 or later.<BR>&nbsp;&nbsp;Header: Declared in Wingdi.h; include Windows.h.<BR>&nbsp;&nbsp;Library: Use Gdi32.lib.<BR>See Also<BR>Brushes Overview, Brush Functions, CreateDIBPatternBrush, CreateDIBPatternBrushPt, CreatePatternBrush, CreateSolidBrush, DeleteObject, GetBrushOrgEx, SelectObject, SetBrushOrgEx, COLORREF, RGB<BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>

⌨️ 快捷键说明

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