netease-im / NIM_Duilib_Framework

网易云信Windows应用开发框架。
MIT License
2.1k stars 835 forks source link

按钮绘制不同步 #382

Open nmgwddj opened 2 years ago

nmgwddj commented 2 years ago

Discussed in https://github.com/netease-im/NIM_Duilib_Framework/discussions/381

Originally posted by **huangzhengyi** February 10, 2022 设置按钮的normal(红)、hot(绿) 2种状态颜色
huangzhengyi commented 2 years ago
((Button*)msg->pSender)->SetState(kControlStateNormal);
ui::UiRect _rcWnd;
::SendMessage(m_hWnd, WM_PAINT, (LPARAM)&_rcWnd, (WPARAM)FALSE);
ShowWindow(false);

在按钮隐藏前,先刷新一遍