subject_17740.htm

来自「一些关于vc的问答」· HTM 代码 · 共 36 行

HTM
36
字号
<p>
序号:17740 发表者:丰保民 发表日期:2002-10-15 10:09:58
<br>主题:请问大虾一个有关GetSysColor函数的问题,谢谢
<br>内容:我是一个初学者,在看一些源代码时,发现有一些函数如<BR>GetSysColor(COLOR_3DFACE),AfxRegisterWndClass(0),但是我却在运行类库中查不到这些函数的具体说明,也不是自己定义的函数.请问大虾这些是什么函数,在哪里可以查到?谢谢
<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>回复者:CDMA2000 回复日期:2002-10-15 10:13:57
<br>内容:这是WIN32 API函数啊<BR>你安装了MSDN没有啊<BR>你选定GetSysColor然后按F1就进入了MSDN的该函数的主题<BR>你也可以直接进入MSDN进行搜索
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:Norton AntivVirus 回复日期:2002-10-15 10:15:39
<br>内容:GetSysColor:<BR>The GetSysColor function retrieves the current color of the specified display element. Display elements are the parts of a window and the display that appear on the system display screen. <BR><BR>AfxRegisterWndClass:<BR>The Microsoft Foundation Class Library automatically registers several standard window classes for you. Call this function if you want to register your own window classes.<BR><BR>The name registered for a class by AfxRegisterWndClass depends solely on the parameters. If you call AfxRegisterWndClass multiple times with identical parameters, it only registers a class on the first call. Subsequent calls to AfxRegisterWndClass with identical parameters simply return the already-registered classname.<BR><BR>If you call AfxRegisterWndClass for multiple CWnd-derived classes with identical parameters, instead of getting a separate window class for each class, each class shares the same window class. This can cause problems if the CS_CLASSDC class style is used. Instead of multiple CS_CLASSDC window classes, you end up with one CS_CLASSDC window class, and all C++ windows that use that class share the same DC. To avoid this problem, call AfxRegisterClass to register the class.<BR><BR>在msdn中可以查到详细信息!
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:徐景周 回复日期:2002-10-15 10:18:41
<br>内容:GetSysColor是获取WINDOWS系统颜色涵数,如GetSysColor(COLOR_3DFACE)是获取按钮、对话框的背景颜色的。AfxRegisterWndClass是注册窗口类涵数,都可在msdn中查到。<BR>涵数声明如下:<BR>DWORD GetSysColor(<BR>&nbsp;&nbsp;int nIndex&nbsp;&nbsp; // display element<BR>);<BR>Parameters<BR>nIndex <BR>[in] Specifies the display element whose color is to be retrieved. This parameter can be one of the following values. Value Meaning <BR>COLOR_3DDKSHADOW Dark shadow for three-dimensional display elements. <BR>COLOR_3DFACE, COLOR_BTNFACE Face color for three-dimensional display elements and for dialog box backgrounds. <BR>COLOR_3DHILIGHT, COLOR_3DHIGHLIGHT, COLOR_BTNHILIGHT, COLOR_BTNHIGHLIGHT Highlight color for three-dimensional display elements (for edges facing the light source.) <BR>COLOR_3DLIGHT Light color for three-dimensional display elements (for edges facing the light source.) <BR>COLOR_3DSHADOW, COLOR_BTNSHADOW Shadow color for three-dimensional display elements (for edges facing away from the light source). <BR>COLOR_ACTIVEBORDER Active window border. <BR>COLOR_ACTIVECAPTION Active window title bar. <BR>Windows 98, Windows 2000: Specifies the left side color in the color gradient of an active window's title bar if the gradient effect is enabled.<BR> <BR>COLOR_APPWORKSPACE Background color of multiple document interface (MDI) applications. <BR>COLOR_BACKGROUND, COLOR_DESKTOP Desktop. <BR>COLOR_BTNTEXT Text on push buttons. <BR>COLOR_CAPTIONTEXT Text in caption, size box, and scroll bar arrow box. <BR>COLOR_GRADIENTACTIVECAPTION Windows 98, Windows 2000: Right side color in the color gradient of an active window's title bar. COLOR_ACTIVECAPTION specifies the left side color. Use SPI_GETGRADIENTCAPTIONS with the SystemParametersInfo function to determine whether the gradient effect is enabled. <BR>COLOR_GRADIENTINACTIVECAPTION Windows 98, Windows 2000: Right side color in the color gradient of an inactive window's title bar. COLOR_INACTIVECAPTION specifies the left side color.&nbsp;&nbsp;<BR>COLOR_GRAYTEXT Grayed (disabled) text. This color is set to 0 if the current display driver does not support a solid gray color. <BR>COLOR_HIGHLIGHT Item(s) selected in a control. <BR>COLOR_HIGHLIGHTTEXT Text of item(s) selected in a control. <BR>COLOR_HOTLIGHT Windows 98, Windows 2000: Color for a hot-tracked item. Single clicking a hot-tracked item executes the item. <BR>COLOR_INACTIVEBORDER Inactive window border. <BR>COLOR_INACTIVECAPTION Inactive window caption. <BR>Windows 98, Windows 2000: Specifies the left side color in the color gradient of an inactive window's title bar if the gradient effect is enabled.<BR> <BR>COLOR_INACTIVECAPTIONTEXT Color of text in an inactive caption. <BR>COLOR_INFOBK Background color for tooltip controls. <BR>COLOR_INFOTEXT Text color for tooltip controls. <BR>COLOR_MENU Menu background. <BR>COLOR_MENUTEXT Text in menus. <BR>COLOR_SCROLLBAR Scroll bar gray area. <BR>COLOR_WINDOW Window background. <BR>COLOR_WINDOWFRAME Window frame. <BR>COLOR_WINDOWTEXT Text in windows. <BR><BR><BR>Return Values<BR>The function returns the red, green, blue (RGB) color value of the given element. <BR><BR>If the nIndex parameter is out of range, the return value is zero. Because zero is also a valid RGB value, you cannot use GetSysColor to determine whether a system color is supported by the current platform. Instead, use the GetSysColorBrush function, which returns NULL if the color is not supported.<BR><BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:Norton AntivVirus 回复日期:2002-10-15 10:20:36
<br>内容:啊,我倒~~~~~~~~~~~
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:expeditor 回复日期:2002-10-16 17:44:56
<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 + =
减小字号Ctrl + -
显示快捷键?