void TransLucent(HWND m_hWnd,const int&R)//R的取值为0~500 为透明度
{
SetWindowLong(m_hWnd,GWL_EXSTYLE, GetWindowLong(m_hWnd,GWL_EXSTYLE) | WS_EX_LAYERED);
SetWindowLong(m_hWnd, GWL_EXSTYLE,GetWindowLong(m_hWnd, GWL_EXSTYLE) & ~WS_EX_LAYERED);
RedrawWindow(NULL, NULL,RDW_ERASE | RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN); SetWindowLong(m_hWnd,GWL_EXSTYLE,GetWindowLong(m_hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);
::SetLayeredWindowAttributes(m_hWnd, 0, (BYTE)R, LWA_ALPHA);
}
{
SetWindowLong(m_hWnd,GWL_EXSTYLE, GetWindowLong(m_hWnd,GWL_EXSTYLE) | WS_EX_LAYERED);
SetWindowLong(m_hWnd, GWL_EXSTYLE,GetWindowLong(m_hWnd, GWL_EXSTYLE) & ~WS_EX_LAYERED);
RedrawWindow(NULL, NULL,RDW_ERASE | RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN); SetWindowLong(m_hWnd,GWL_EXSTYLE,GetWindowLong(m_hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);
::SetLayeredWindowAttributes(m_hWnd, 0, (BYTE)R, LWA_ALPHA);
}