예제 #1
0
void explorer_show_frame(int cmdShow, LPTSTR lpCmdLine)
{
    ExplorerCmd cmd;

    if (g_Globals._hMainWnd) {
        if (IsIconic(g_Globals._hMainWnd))
            ShowWindow(g_Globals._hMainWnd, SW_RESTORE);
        else
            SetForegroundWindow(g_Globals._hMainWnd);

        return;
    }

    g_Globals._prescan_nodes = false;

    cmd._mdi =  true;
    cmd._cmdShow = cmdShow;

     // parse command line options, which may overwrite the MDI flag
    if (lpCmdLine)
        cmd.ParseCmdLine(lpCmdLine);

     // create main window
    MainFrameBase::Create(cmd);
}
예제 #2
0
void explorer_show_frame(int cmdShow, LPTSTR lpCmdLine)
{
	ExplorerCmd cmd;

	if (g_Globals._hMainWnd) {
		if (IsIconic(g_Globals._hMainWnd))
			ShowWindow(g_Globals._hMainWnd, SW_RESTORE);
		else
			SetForegroundWindow(g_Globals._hMainWnd);

		return;
	}

	g_Globals._prescan_nodes = false;

	XMLPos explorer_options = g_Globals.get_cfg("general/explorer");
	XS_String mdiStr = XMLString(explorer_options, "mdi");

	 // If there isn't yet the "mdi" setting in the configuration, display the MDI/SDI dialog.
	if (mdiStr.empty())
		Dialog::DoModal(IDD_MDI_SDI, WINDOW_CREATOR(MdiSdiDlg), g_Globals._hwndDesktop);

	 // Now read the MDI attribute again and interpret it as boolean value.
	cmd._mdi = XMLBool(explorer_options, "mdi", true);

	cmd._cmdShow = cmdShow;

	 // parse command line options, which may overwrite the MDI flag
	if (lpCmdLine)
		cmd.ParseCmdLine(lpCmdLine);

	 // create main window
	MainFrameBase::Create(cmd);
}