Ejemplo n.º 1
0
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
    CString			t = "";
    lpCreateStruct->dwExStyle |= WS_MINIMIZE;
    if (CFrameWnd::OnCreate(lpCreateStruct) == k_undefined)
        return -1;

    // Tool bar
    p_flags_toolbar = new CFlagsToolbar(this);

    // Status bar
    p_openholdem_statusbar = new COpenHoldemStatusbar(this);

    // Start timer that checks if we should enable buttons
    SetTimer(ENABLE_BUTTONS_TIMER, 50, 0);

    // Start timer that updates status bar
    SetTimer(UPDATE_STATUS_BAR_TIMER, 500, 0);

    // Start timer that attaches the OH window when the poker window moves
    SetTimer(ATTACH_WINDOW_TIMER, 20, 0);

    if (preferences.simple_window_title())
        SetMainWindowTitle("");

    return 0;
}
Ejemplo n.º 2
0
//-----------------------------------------------------------------------------
//	ConfigDlg_SaveConfig
//
//-----------------------------------------------------------------------------
void ConfigDlg_SaveConfig()
{
	// save config
	Sys_SetRegistryString( "xboxName", g_xboxTargetName );
	Sys_SetRegistryString( "localPath", g_localPath );
	Sys_SetRegistryString( "targetPath", g_targetPath );
	Sys_SetRegistryString( "installPath", g_installPath );
	Sys_SetRegistryInteger( "clearOnConnect", g_clsOnConnect );
	Sys_SetRegistryInteger( "loadSymbolsOnConnect", g_loadSymbolsOnConnect );
	Sys_SetRegistryInteger( "alwaysAutoConnect", g_alwaysAutoConnect );
	Sys_SetRegistryInteger( "startMinimized", g_startMinimized );
	Sys_SetRegistryInteger( "captureDebugSpew", g_captureDebugSpew_StartupState );

	// update
	SetMainWindowTitle();
}
Ejemplo n.º 3
0
void CMainFrame::OnFileOpen()
{
    COpenHoldemDoc *pDoc = (COpenHoldemDoc *)this->GetActiveDocument();

    if (!pDoc->SaveModified())
        return;        // leave the original one

    CFileDialog			cfd(true);

    cfd.m_ofn.lpstrInitialDir = preferences.path_ohf();
    cfd.m_ofn.lpstrFilter = "OpenHoldem Files (.ohf)\0*.ohf\0All files (*.*)\0*.*\0\0";
    cfd.m_ofn.lpstrTitle = "Select Formula file to OPEN";
    if (cfd.DoModal() == IDOK)
    {
        pDoc->OnOpenDocument(cfd.GetPathName());
        pDoc->SetPathName(cfd.GetPathName());
        // Update window title, registry
        SetMainWindowTitle(cfd.GetFileTitle() + " - " + CString(MAKEINTRESOURCE(AFX_IDS_APP_TITLE)));
        preferences.SetValue(k_prefs_path_ohf, cfd.GetPathName());
    }
}
Ejemplo n.º 4
0
void CMainFrame::UpdateWindowTitle()
{
    SetMainWindowTitle(p_formula->formula_name() + " - " + m_strTitle);
}