透明度的设置实在pFunc里面的那个200的值 它的取值范围是0~255 0表示全透明的
255表示不透明
SetWindowLong(m_hWnd,GWL_EXSTYLE,GetWindowLong(m_hWnd,GWL_EXSTYLE)^0x80000);
HINSTANCE hInst = LoadLibrary("User32.DLL");
if (hInst != NULL)
{
typedef BOOL (WINAPI *MYFUNC)(HWND, COLORREF, BYTE, DWORD);
MYFUNC pFunc = (MYFUNC)GetProcAddress(hInst, "SetLayeredWindowAttributes");
if (pFunc != NULL)
{
pFunc(m_hWnd, 0, 200, 2);
}
FreeLibrary(hInst);
hInst = NULL;
}