惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
A
About on SuperTechFans
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog RSS Feed
U
Unit 42
Stack Overflow Blog
Stack Overflow Blog
Recent Announcements
Recent Announcements
雷峰网
雷峰网
罗磊的独立博客
Microsoft Security Blog
Microsoft Security Blog
Hugging Face - Blog
Hugging Face - Blog
L
LangChain Blog
人人都是产品经理
人人都是产品经理
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Help Net Security
P
Proofpoint News Feed
The Cloudflare Blog
D
Docker
大猫的无限游戏
大猫的无限游戏

博客园 - 泡泡

设置文件属性 VC - 泡泡 - 博客园 程序小注意 - 泡泡 - 博客园 有关进程创建,与子进程的路径指定 dll 有关CComboBox - 泡泡 - 博客园 有关线程 ADO 存储过程 - 泡泡 - 博客园 VC执行存储过程 - 泡泡 - 博客园 读写文件操作 - 泡泡 - 博客园 Access数据库SQL操作 ComboBox控件-转 CTime 常用字符转换 字符串分解 音频 Inno SetUp 控件LIST 有关音频编码 Windows Media
窗口透明、半透明
泡泡 · 2006-05-19 · via 博客园 - 泡泡

SetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE, GetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE)|0x80000);
 HINSTANCE hInst = LoadLibrary("User32.DLL");
 if(hInst)
 {
  typedef BOOL (WINAPI *MYFUNC)(HWND,COLORREF,BYTE,DWORD);
  MYFUNC fun = NULL;
  //取得SetLayeredWindowAttributes函数指针
  fun=(MYFUNC)GetProcAddress(hInst, "SetLayeredWindowAttributes");
  if(fun)fun(this->GetSafeHwnd(),0,150,2);
  FreeLibrary(hInst);
 } 

//说明:
1.增加WS_EX_LAYERED窗口风格,值为80000
2.在头文件第一行定义#define _WIN32_WINNT 0x500

3. SetLayeredWindowAttributes(
    hWnd,
    0,//颜色值。
    150,//透明深度 0-为完全透明,255-为不透明
    ULW_ALPHA);//参数,表示透明效果。为1,表示对单种颜色透明