使桌面文字透明
2005-04-25 17:33
162 查看
#include "stdafx.h"
#include "DeskH.h"#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endifCWinApp theApp;using namespace std;int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
HWND hWnd;
hWnd = ::FindWindow("Progman", "Program Manager");
hWnd=FindWindowEx(hWnd,NULL, "SHELLDLL_DefView",NULL);
HWND hDesktop; hDesktop=::GetDlgItem(hWnd,1);
ListView_SetTextBkColor(hDesktop,CLR_NONE);
ListView_SetTextColor(hDesktop,CLR_DEFAULT);
::InvalidateRect(hDesktop,NULL,TRUE);
return 0;
}
说明:
1)整个windows桌面就是一个窗体(名为Program Manager),而这个窗体里有一个ListView控件,所有的桌面菜单就是显示在这个ListView中。
2)ListView_SetTextBkColor是系统一个预定义的宏,此宏在COMMCTRL.H中定义。
3)得到ListView句柄,用ListView_SetTextBkColor完成功能。
#include "DeskH.h"#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endifCWinApp theApp;using namespace std;int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
HWND hWnd;
hWnd = ::FindWindow("Progman", "Program Manager");
hWnd=FindWindowEx(hWnd,NULL, "SHELLDLL_DefView",NULL);
HWND hDesktop; hDesktop=::GetDlgItem(hWnd,1);
ListView_SetTextBkColor(hDesktop,CLR_NONE);
ListView_SetTextColor(hDesktop,CLR_DEFAULT);
::InvalidateRect(hDesktop,NULL,TRUE);
return 0;
}
说明:
1)整个windows桌面就是一个窗体(名为Program Manager),而这个窗体里有一个ListView控件,所有的桌面菜单就是显示在这个ListView中。
2)ListView_SetTextBkColor是系统一个预定义的宏,此宏在COMMCTRL.H中定义。
3)得到ListView句柄,用ListView_SetTextBkColor完成功能。
相关文章推荐
- 禁用组策略中的ACtive desktop来使桌面图标文字透明
- 如何使桌面图标文字透明
- 想让您的桌面文字背景透明吗?
- 桌面图标的文字背景色如何恢复为透明
- 桌面上的图标文字改成透明
- Windows桌面文字透明
- 怎样去掉桌面图标阴影(文字背景透明)
- [转]设置桌面图标文字透明
- windows xp桌面图标文字背景不是透明的改透明
- 【转】桌面图标文字 透明
- WinXP\2003怎么让桌面图标的文字背景透明(终于去掉了讨厌的图标蓝色背景文字)
- 让桌面文字背景透明的6步曲
- 想让您的桌面文字背景透明吗?
- XP电脑桌面图标文字带上颜色不透明 解决办法
- 设置桌面图标文字背景透明
- 关于桌面图标边缘模糊及文字透明
- QT中调用mplayer显示视频并加透明文字
- win32与winCE下MFC背景贴图、静态文字背景透明
- win2003 桌面图标不透明的解决办法
- 让后台程序在桌面显示提示文字,并自动消失