Chinaunix首页 | 论坛 | 博客
  • 博客访问: 12858
  • 博文数量: 7
  • 博客积分: 280
  • 博客等级: 二等列兵
  • 技术积分: 80
  • 用 户 组: 普通用户
  • 注册时间: 2008-05-25 17:51
文章分类
文章存档

2008年(7)

我的朋友
最近访客

分类: WINDOWS

2008-05-25 17:54:01

    HWND hWnd = ::FindWindow(_TEXT("Shell_TrayWnd"), NULL);
    if(hWnd!=NULL)
    {
        ::SetWindowLong(hWnd, GWL_EXSTYLE, GetWindowLong(hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);
        ::SetLayeredWindowAttributes(hWnd, 0, 255 * alpha / 100, LWA_ALPHA);
    }

    hWnd = ::FindWindow(_TEXT("DV2ControlHost"), NULL);
    if(hWnd!=NULL)
    {
        ::SetWindowLong(hWnd, GWL_EXSTYLE, GetWindowLong(hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);
        ::SetLayeredWindowAttributes(hWnd, 0, 255 * alpha / 100, LWA_ALPHA);
    }

    hWnd = ::FindWindow(_TEXT("BaseBar"), NULL);
    if(hWnd!=NULL)
    {
        ::SetWindowLong(hWnd, GWL_EXSTYLE, GetWindowLong(hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);
        ::SetLayeredWindowAttributes(hWnd, 0, 255 * alpha / 100, LWA_ALPHA);
    }

阅读(701) | 评论(0) | 转发(0) |
0

上一篇:windows关机代码

下一篇:在C中使用Lua

给主人留下些什么吧!~~