【发布时间】:2022-12-06 03:16:49
【问题描述】:
Result of my Code 创建按钮代码:
// Create Button
dwStyle = (WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON);
HWND hwndButton = CreateWindow(
L"BUTTON", // Predefined class; Unicode assumed
L"OK", // Button text
dwStyle, // Styles
10, // x position
10, // y position
70, // Button width
30, // Button height
hwndMain, // Parent window
NULL, // No menu.
(HINSTANCE)GetWindowLongPtr(hwndMain, GWLP_HINSTANCE), // Instance handle
NULL // Pointer not needed.
);
我的期望是按钮和文本框也将处于暗模式。如果没有办法自动执行此操作,如何手动执行此操作?例如,如何使用我想要的颜色从头开始创建按钮?
【问题讨论】:
标签: c++ winapi window darkmode