SetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE,GetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE)^0x8000);
HINSTANCE hInst = LoadLibrary(TEXT("User32.DLL"));
if(hInst)
{
typedef BOOL (WINAPI* MYFUNC)(HWND,COLORREF,BYTE,DWORD);
MYFUNC fun = NULL;
fun = (MYFUNC)GetProcAddress(hInst,"SetLayeredWindowAttributes");
if(fun)
fun(this->GetSafeHwnd(),0,100,2);
FreeLibrary(hInst);
}
我看到 CSDN 的帖子中,是 0x80000,你的少了一個零。