0
在使用WTL/ATL/Windows API时,我创建了一个带按钮和列表视图的窗口对话框,我想将一些我已经收到的样式作为图像应用,关于业主drawn..custom绘制和其他的东西,但我不能找到一个例子,我曾尝试:win32/wtl中的自定义绘图对话框
LRESULT OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
HDC hdc;
RECT rect = {0};
PAINTSTRUCT ps;
rect.top = 100;
rect.right = 100;
rect.bottom = 100;
hdc = BeginPaint(&ps);
::FillRect(hdc, &rect, (HBRUSH)(COLOR_BTNFACE + 1));
EndPaint(&ps);
return 0;
}
它不显示在对话框上的任何东西。