AutoCAD 3DMAX C语言 Pro/E UG JAVA编程 PHP编程 Maya动画 Matlab应用 Android
Photoshop Word Excel flash VB编程 VC编程 Coreldraw SolidWorks A Designer Unity3D
 首页 > VC编程

用VC实现桌面文字背景透明摆脱黑白

51自学网 2015-08-30 http://www.wanshiok.com
Module name : Transparent.cpp
*
* Module description :
* To make desktop icon text background transparent.
*
* Project :
*
* Target platform : Win32
*
* Compiler & Library : Visual C++ 6.0
*
* Author : Richard Shen
*
* Creation date : 19 June, 1999
*
#include <windows.h>

int main(void)
{
HWND hWnd;

hWnd = GetDesktopWindow();
if ((hWnd = FindWindowEx(hWnd, 0, "Progman", "Program Manager")) == 0)
return 1;

if ((hWnd = FindWindowEx(hWnd, 0, "SHELLDLL_DefView", NULL)) == 0)
return 1;

if ((hWnd = FindWindowEx(hWnd, 0, "SysListView32", NULL)) == 0)
return 1;

// Change icon text attributes
SendMessage(hWnd, 0x1026, 0, 0xffffffff); // Turn background to transparent
SendMessage(hWnd, 0x1024, 0, 0x00ffffff); // Turn foregound to white

InvalidateRect(hWnd, NULL, TRUE); // Repaint

return 0;
} // main()

 

 

 
说明
:本教程来源互联网或网友上传或出版商,仅为学习研究或媒体推广,wanshiok.com不保证资料的完整性。
上一篇:俄罗斯方块源代码  下一篇:在VC程序中加载GIF动画