예제 #1
0
BOOL CPlaySettingsPage::EditSettings() 
{
	CString strValue;
	CRegistry pRegistry;
	
	m_wndLock.GetWindowText( strValue );
	int nItem = m_wndLock.FindStringExact( -1, strValue );
	
	if ( ! nItem ) strValue.Empty();
//	LockJob( strValue,  );
	
	pRegistry.SetString( "Notify", "LockCh", strValue );

	m_wndNavOffset.GetWindowText( strValue );
	pRegistry.SetString( "Notify", "NavOffset", strValue );

	return TRUE;
}
BOOL CVistaSettingsPage::EditSettings()
{
    CString strValue;
    CRegistry pRegistry;

    m_wndHost.GetWindowText( strValue );
    pRegistry.SetString( "Vista", "Host", strValue );

    return TRUE;
}
예제 #3
0
///////////////////////////////////////////////////////
// CSoundRegistry::SoundEvent
//
//
void CSoundRegistry::SoundEvent(LPCSTR szEvent, LPCSTR szEventName, LPCSTR szPath)
{
	CRegistry sound;
	CString sEvent("AppEvents\\EventLabels\\");

	sEvent += szEvent;

	sound.CreateKey(sEvent, HKEY_CURRENT_USER);
	sound.SetString(NULL, szEventName);

	sEvent  = "AppEvents\\Schemes\\Apps\\";
	sEvent  += m_sScheme;

	if (!m_bSetScheme)
	{
		m_bSetScheme = TRUE;
		sound.CreateKey(sEvent, HKEY_CURRENT_USER);
		sound.SetString(NULL, m_sSchemeName);
	}

	sEvent += '\\';
	sEvent += szEvent;

	// If the key doesn't exist
	if (!sound.OpenKey(sEvent, HKEY_CURRENT_USER))
	{
		// Create the key with the right name
		sound.CreateKey(sEvent, HKEY_CURRENT_USER);
		sound.SetString(NULL, szEventName);

		// Set the default sound
		sEvent += "\\.current";
		sound.CreateKey(sEvent, HKEY_CURRENT_USER);
		sEvent  = szPath;
		sEvent += szEventName;
		sEvent += ".wav";
		sound.SetString(NULL, sEvent);
	}
}
예제 #4
0
void CSettings::Item::Save()
{
	CRegistry pRegistry;
	
	int nPos = m_sName.Find( '.' );
	if ( nPos < 0 ) return;

	if ( m_pDword )
	{
		pRegistry.SetInt( m_sName.Left( nPos ), m_sName.Mid( nPos + 1 ), *m_pDword );
	}
	else if ( m_pFloat )
	{
		CString str;
		str.Format( _T("%e"), *m_pFloat );
		pRegistry.SetString( m_sName.Left( nPos ), m_sName.Mid( nPos + 1 ), str );
	}
	else
	{
		pRegistry.SetString( m_sName.Left( nPos ), m_sName.Mid( nPos + 1 ), *m_pString );
	}
}