//在 IDC_BUTTON_TRANS中,
void CTransDesktopDlg::OnTransparent()
{
// TODO: Add your control notification handler code here
TransparentDeskIcon(TRUE);
}
void CTransDesktopDlg::TransparentDeskIcon(boolean bTrans)
{
HWND hWin;
RECT rt; hWin=::FindWindow("Progman", "Program Manager");
hWin=FindWindowEx(hWin, 0, "SHELLDLL_DefView", NULL);
hWin=FindWindowEx(hWin, 0, "SysListView32", NULL); //void assert( int expression ); if (bTrans)
{
//transparent it
::SendMessage( hWin, LVM_SETTEXTBKCOLOR, 0, 0xffffffff);
}
else
{
//recover
::SendMessage (hWin, LVM_SETTEXTBKCOLOR, 0, COLOR_DESKTOP);
} InvalidateRect(&rt,TRUE);
::GetWindowRect(hWin,&rt);
::UpdateWindow(hWin);}
void CTransDesktopDlg::OnTransparent()
{
// TODO: Add your control notification handler code here
TransparentDeskIcon(TRUE);
}
void CTransDesktopDlg::TransparentDeskIcon(boolean bTrans)
{
HWND hWin;
RECT rt; hWin=::FindWindow("Progman", "Program Manager");
hWin=FindWindowEx(hWin, 0, "SHELLDLL_DefView", NULL);
hWin=FindWindowEx(hWin, 0, "SysListView32", NULL); //void assert( int expression ); if (bTrans)
{
//transparent it
::SendMessage( hWin, LVM_SETTEXTBKCOLOR, 0, 0xffffffff);
}
else
{
//recover
::SendMessage (hWin, LVM_SETTEXTBKCOLOR, 0, COLOR_DESKTOP);
} InvalidateRect(&rt,TRUE);
::GetWindowRect(hWin,&rt);
::UpdateWindow(hWin);}
好象要先关闭"按web方式查看活动桌面"选项