::SetWindowLong( m_hWnd, GWL_EXSTYLE, GetWindowLong(m_hWnd, GWL_EXSTYLE) | WS_EX_LAYERED); ::SetLayeredWindowAttributes( m_hWnd, 0, 200, LWA_ALPHA); // 120是透明度,范围是0~255
::SetWindowLong( m_hWnd, GWL_EXSTYLE, GetWindowLong(m_hWnd, GWL_EXSTYLE) | WS_EX_LAYERED); ::SetLayeredWindowAttributes( m_hWnd, 0, 200, LWA_ALPHA); // 120是透明度,范围是0~255
转载于:https://www.cnblogs.com/kingbin/p/4109834.html