B
base3
Unregistered / Unconfirmed
GUEST, unregistred user!
应该很容易的,可惜我不会
是用来使桌面图标的文字透明化的
#include <windows.h>
#include <commctrl.h>
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
HWND hwnd = FindWindow("Progman", "Program Manager");
if ( hwnd != NULL )
{
hwnd = FindWindowEx(hwnd, NULL, "SHELLDLL_DefView", "");
if ( hwnd != NULL )
{
hwnd = FindWindowEx(hwnd, NULL, "SysListView32", "");
if ( hwnd != NULL )
{
if ( ListView_GetTextBkColor(hwnd) != CLR_NONE )
{
ListView_SetTextBkColor(hwnd, CLR_NONE);
}
else
{
ListView_SetTextBkColor(hwnd, GetSysColor(COLOR_DESKTOP));
}
InvalidateRect(hwnd, NULL, TRUE);
UpdateWindow(hwnd);
}
}
}
return 0;
}
是用来使桌面图标的文字透明化的
#include <windows.h>
#include <commctrl.h>
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
HWND hwnd = FindWindow("Progman", "Program Manager");
if ( hwnd != NULL )
{
hwnd = FindWindowEx(hwnd, NULL, "SHELLDLL_DefView", "");
if ( hwnd != NULL )
{
hwnd = FindWindowEx(hwnd, NULL, "SysListView32", "");
if ( hwnd != NULL )
{
if ( ListView_GetTextBkColor(hwnd) != CLR_NONE )
{
ListView_SetTextBkColor(hwnd, CLR_NONE);
}
else
{
ListView_SetTextBkColor(hwnd, GetSysColor(COLOR_DESKTOP));
}
InvalidateRect(hwnd, NULL, TRUE);
UpdateWindow(hwnd);
}
}
}
return 0;
}