المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : set dialog transparence but control not



C++ Programming
09-01-2009, 10:28 AM
add code in OnInitDialog

SetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE,GetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE)^0x80000);

HINSTANCE hInst = LoadLibrary(_T("User32.DLL"));
COLORREF color1= RGB(0,255,0);

if(hInst)
{
typedef BOOL (WINAPI *MYFUNC)(HWND,COLORREF,BYTE,DWORD);
MYFUNC fun = NULL;
//??SetLayeredWindowAttributes????
fun=(MYFUNC)GetProcAddress(hInst, "SetLayeredWindowAttributes");

if(fun)fun(this->GetSafeHwnd(),color1,160,2);

FreeLibrary(hInst);
}
can make dialog transparence .The control also become transparence too, how to do that i need transparence dialog and opacity control.