继承CDialogEx,并在 OnInitDialog() 添加一下代码
SetBackgroundColor(#010b15);
LONG ExtendedStyle = GetWindowLong(GetSafeHwnd(),GWL_EXSTYLE );
SetWindowLong(GetSafeHwnd(),GWL_EXSTYLE,ExtendedStyle | WS_EX_LAYERED );
::SetLayeredWindowAttributes(GetSafeHwnd(),#010b15,0,LWA_COLORKEY);