Replies: 3 comments 6 replies
-
参考 NIM Demo 示例:https://github.com/netease-kit/NIM_PC_Demo/blob/a3a504a33c957922edcdfdfbccbbbc36bc729cc4/nim_win_demo/gui/main/main_form.cpp#L68-L78 |
Beta Was this translation helpful? Give feedback.
6 replies
-
重命名 xml 中的关闭按钮名称(duilib 内部有 btnclose 的默认实现会导致该问题)如 void BasicForm::InitWindow()
{
auto close = dynamic_cast<ui::Button*>(FindControl(L"btn_close"));
if (close) {
close->AttachClick([this](ui::EventArgs* event) {
SendMessage(WM_SYSCOMMAND, SC_MINIMIZE);
::ShowWindow(m_hWnd, SW_HIDE);
nbase::ThreadManager::PostDelayedTask(0, [this]() {
this->ActiveWindow();
::SetForegroundWindow(m_hWnd);
::BringWindowToTop(m_hWnd);
}, nbase::TimeDelta::FromSeconds(2));
return true;
});
}
}
LRESULT BasicForm::OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
return __super::OnClose(uMsg, wParam, lParam, bHandled);
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
使用showwindow(false, false)最小化到托盘后
在双击消息里面showwindow(true, true)无法弹出主界面 在任务栏有显示 但界面无法弹出
是我的使用方法不对吗
Beta Was this translation helpful? Give feedback.
All reactions