设置MFC窗口透明

SetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE,GetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE)^0x80000);
 bool b = SetLayeredWindowAttributes(0,255/2,LWA_ALPHA);

SetWindowLong设置窗口属性,包含GWL_EXSTYLE

SetLayeredWindowAttributes设置半透明效果

你可能感兴趣的:(mfc)