myWinAttrib.cpp
上传用户:hyb6888
上传日期:2016-01-24
资源大小:5186k
文件大小:1k
- #include "stdafx.h"
- #include "myWinAttrib.h"
- myWinAttrib::myWinAttrib()
- {
- hUser32 = GetModuleHandle("user32.dll");
- SetLayeredWindowAttributes = (lpfnSetLayeredWindowAttributes)GetProcAddress(hUser32,"SetLayeredWindowAttributes");
- }
- myWinAttrib::~myWinAttrib()
- {
- FreeLibrary(hUser32);//卸载TranChiDll.dll文件;
- }
- int myWinAttrib::mySetWindow(HWND hWnd, long crKey, BYTE bAlpha, DWORD dwFlags)
- {
- SetWindowLong(hWnd, GWL_EXSTYLE, GetWindowLong(hWnd, GWL_EXSTYLE) | 0x080000L);
- SetLayeredWindowAttributes(hWnd, crKey , bAlpha, dwFlags);
- return 0;
- }