1: //Set WS_EX_LAYERED on this window
2: ::SetWindowLong(GetSafeHwnd(),3: GWL_EXSTYLE,4: ::GetWindowLongPtr(GetSafeHwnd(),GWL_EXSTYLE)|WS_EX_LAYERED);5:6: //Make this window 70% alpha transparent
7: this->SetLayeredWindowAttributes(0,(255*70)/100,LWA_ALPHA);
1: //Remove WS_EX_LAYERED from window style
2: ::SetWindowLong(GetSafeHwnd(),3: GWL_EXSTYLE,4: ::GetWindowLongPtr(GetSafeHwnd(),GWL_EXSTYLE)&~WS_EX_LAYERED);5: //Repaint
6: this->RedrawWindow();