Fix: move InitControl() before PostMessage to prevent empty columns

This commit is contained in:
yuanyuanxiang
2026-06-11 22:36:38 +02:00
parent 8c64886512
commit b4ef42923a

View File

@@ -2062,6 +2062,11 @@ BOOL CMy2015RemoteDlg::OnInitDialog()
pSysMenu->AppendMenuL(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
// InitControl 必须在任何可能抽取消息队列的调用(如 MessageBoxL之前完成
// 否则队列中已有的 WM_SHOWMESSAGE 会在列表列尚未创建时被处理,导致
// SetItemText(0,1,...)/SetItemText(0,2,...) 静默失败造成首条记录列1/2为空。
InitControl();
UPDATE_SPLASH(40, "正在加载授权模块...");
// 主控程序公网IP
std::string ip = THIS_CFG.GetStr("settings", "master", "");
@@ -2144,7 +2149,6 @@ BOOL CMy2015RemoteDlg::OnInitDialog()
isClosed = FALSE;
CreateToolBar();
InitControl();
UPDATE_SPLASH(75, "正在创建界面组件...");
CreatStatusBar();