This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BOOL CTestDarkModeDlg::OnInitDialog() | |
{ | |
__super::OnInitDialog(); | |
// Snipped other code for berevity | |
// Set the dark mode theme | |
SetWindowTheme(GetDlgItem(IDC_EDIT1)->GetSafeHwnd(), L"DarkMode_Explorer", nullptr); | |
// Tweak to render the border correctly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "pch.h" | |
#include "MyStatic.h" | |
BEGIN_MESSAGE_MAP(CMyStatic, CStatic) | |
ON_WM_PAINT() | |
END_MESSAGE_MAP() | |
void CMyStatic::OnPaint() { | |
CPaintDC dc(this); // Device context for painting |