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

📄 subject_14273.htm

📁 一些关于vc的问答
💻 HTM
字号:
<p>
序号:14273 发表者:jack 发表日期:2002-09-05 14:24:29
<br>主题:半透明的效果怎么实现?
<br>内容:比如,半透明的模态对话框。
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:了了 回复日期:2002-09-05 14:29:55
<br>内容:SetLayeredWindowAttributes()
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:jack 回复日期:2002-09-05 14:43:23
<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>
<font color=red>答案被接受</font><br>回复者:了了 回复日期:2002-09-05 14:55:14
<br>内容:SetLayeredWindowAttributes<BR>The SetLayeredWindowAttributes function sets the opacity and transparency color key of a layered window.<BR><BR>BOOL SetLayeredWindowAttributes(<BR>&nbsp;&nbsp;HWND hwnd,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // handle to the layered window<BR>&nbsp;&nbsp;COLORREF crKey,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// specifies the color key<BR>&nbsp;&nbsp;BYTE bAlpha,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // value for the blend function<BR>&nbsp;&nbsp;DWORD dwFlags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// action<BR>);<BR>Parameters<BR>hwnd <BR>[in] Handle to the layered window. A layered window is created by specifying WS_EX_LAYERED when creating the window with the CreateWindowEx function or by setting WS_EX_LAYERED via SetWindowLong after the window has been created. <BR>crKey <BR>[in] Pointer to a COLORREF value that specifies the transparency color key to be used when composing the layered window. All pixels painted by the window in this color will be transparent. To generate a COLORREF, use the RGB macro. <BR>bAlpha <BR>[in] Alpha value used to describe the opacity of the layered window. Similar to the SourceConstantAlpha member of the BLENDFUNCTION structure. When bAlpha is 0, the window is completely transparent. When bAlpha is 255, the window is opaque. <BR>dwFlags <BR>[in] Specifies an action to take. This parameter can be one or more of the following values. Value Meaning <BR>LWA_COLORKEY Use crKey as the transparency color.&nbsp;&nbsp;<BR>LWA_ALPHA Use bAlpha to determine the opacity of the layered window.. <BR><BR><BR>Return Values<BR>If the function succeeds, the return value is nonzero.<BR><BR>If the function fails, the return value is zero. To get extended error information, call GetLastError. <BR><BR>Remarks<BR>Note that once SetLayeredWindowAttributes has been called for a layered window, subsequent UpdateLayeredWindow calls will fail until the layering style bit is cleared and set again.<BR><BR>For more information, see Layered Windows.<BR><BR>Requirements <BR>&nbsp;&nbsp;Windows NT/2000: Requires Windows 2000.<BR>&nbsp;&nbsp;Windows 95/98: Unsupported.<BR>&nbsp;&nbsp;Header: Declared in Winuser.h; include Windows.h.<BR>&nbsp;&nbsp;Library: Use User32.lib.<BR><BR>ALL ABOVE COME FORM MSDN<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>
回复者:killer 回复日期:2002-09-06 00:12:56
<br>内容:我在使用此函数时出现以下错误如何解决??<BR><BR>error C2065: 'SetLayeredWindowAttributes' : undeclared identifier<BR>error C2065: 'LWA_ALPHA' : undeclared identifier<BR>error C2065: 'WS_EX_LAYERED' : undeclared identifier<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>
回复者:巴巴罗沙 回复日期:2003-01-08 17:24:07
<br>内容:再程序开头添加:#define WINVER 0x0500<BR>2003-1-8 17:24:50

⌨️ 快捷键说明

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