Initialize the status bar earlier.

We try to set its text sometimes before creating it, which can cause a
random hang.  It could also maybe be causing the window titles to be
blanked out.
This commit is contained in:
Unknown W. Brackets 2014-02-17 20:46:07 -08:00
parent 8da651b6c1
commit ec34c31416

View file

@ -120,6 +120,13 @@ CDisasm::CDisasm(HINSTANCE _hInstance, HWND _hParent, DebugInterface *_cpu) : Di
int w = g_Config.iDisasmWindowW == -1 ? defaultWidth : g_Config.iDisasmWindowW; int w = g_Config.iDisasmWindowW == -1 ? defaultWidth : g_Config.iDisasmWindowW;
int h = g_Config.iDisasmWindowH == -1 ? defaultHeight : g_Config.iDisasmWindowH; int h = g_Config.iDisasmWindowH == -1 ? defaultHeight : g_Config.iDisasmWindowH;
// init status bar
statusBarWnd = CreateWindowEx(0, STATUSCLASSNAME, L"", WS_CHILD | WS_VISIBLE, 0, 0, 0, 0, m_hDlg, (HMENU)IDC_DISASMSTATUSBAR, _hInstance, NULL);
if (g_Config.bDisplayStatusBar == false)
{
ShowWindow(statusBarWnd,SW_HIDE);
}
CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg,IDC_DISASMVIEW)); CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg,IDC_DISASMVIEW));
ptr->setDebugger(cpu); ptr->setDebugger(cpu);
ptr->gotoAddr(0x00000000); ptr->gotoAddr(0x00000000);
@ -169,13 +176,6 @@ CDisasm::CDisasm(HINSTANCE _hInstance, HWND _hParent, DebugInterface *_cpu) : Di
bottomTabs->SetShowTabTitles(g_Config.bShowBottomTabTitles); bottomTabs->SetShowTabTitles(g_Config.bShowBottomTabTitles);
bottomTabs->ShowTab(memHandle); bottomTabs->ShowTab(memHandle);
// init status bar
statusBarWnd = CreateWindowEx(0, STATUSCLASSNAME, L"", WS_CHILD | WS_VISIBLE, 0, 0, 0, 0, m_hDlg, (HMENU)IDC_DISASMSTATUSBAR, _hInstance, NULL);
if (g_Config.bDisplayStatusBar == false)
{
ShowWindow(statusBarWnd,SW_HIDE);
}
// Actually resize the window to the proper size (after the above setup.) // Actually resize the window to the proper size (after the above setup.)
// do it twice so that the window definitely receives a WM_SIZE message with // do it twice so that the window definitely receives a WM_SIZE message with