[C++] WinApi: Alpha Blending and ColorKey Transparent Window
// Alpah (ex, 128)
::SetWindowLong(m_hWnd, GWL_EXSTYLE, GetWindowLong(m_hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);
::SetLayeredWindowAttributes(m_hWnd, NULL, 128, LWA_ALPHA);
// ColorKey (ex: blue color)
::SetWindowLong(m_hWnd, GWL_EXSTYLE, GetWindowLong(m_hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);
::SetLayeredWindowAttributes(m_hWnd, RGB(0,0,255), 0, LWA_COLORKEY);
// Alpha and ColorKey (ex: blue color, 128 alpha)
::SetWindowLong(m_hWnd, GWL_EXSTYLE, GetWindowLong(m_hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);
::SetLayeredWindowAttributes(m_hWnd, RGB(0,0,255), 128, LWA_COLORKEY| LWA_ALPHA);
// Deactivate
::SetWindowLong(m_hWnd, GWL_EXSTYLE, GetWindowLong(m_hWnd, GWL_EXSTYLE) & ~WS_EX_LAYERED);