关于在win2000下实现透明窗口
我在CSDN中看到一篇文章:
在win2000下实现透明窗口
假设要透明的是一个对话框
1.在主文件的顶部#define _WIN32_WINNT 0x5000
否则,WS_EX_LAYERED未定义
2.在WM_INITDIALOG里:
设置风格为WS_EX_LAYERED
SetWindowLong(hWnd,GWL_EXSTYLE,GetWindowLong(hWnd,GWL_EXSTYLE)|WS_EX_LAYERED);
3.调用SetLayeredWindowAttributes函数
SetLayeredWindowAttributes(hWnd, 0, (255 * 70) / 100, LWA_ALPHA);
我按以上做了为什么还显示:
error C2065: 'WS_EX_LAYERED' : undeclared identifier
error C2065: 'SetLayeredWindowAttributes' : undeclared identifier
error C2065: 'LWA_ALPHA' : undeclared identifier
我用的是win2000+vc++6.0+vssp4