界面透明的一个问题
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, 128, 2 );
}
FreeLibrary(hInst);
}
这段代码可以把界面透明化,但是这样的结果是字体也透明了,有没有什么方法可以让界面透明而字体透明度不变的?
谢谢高手了