예제 #1
0
void EditMetricsDlg::OnButtonRemove() 
{
	// TODO: Add your control notification handler code here
	CString sKey, sName;
	GetSelectedKeyAndName( sKey, sName );

	HTREEITEM itemSel = m_tree.GetSelectedItem();
	
	CString sThrowAway;
	bool bInBase = !!iniBase.GetValue( sKey, sName, sThrowAway );

	if( bInBase )
	{
		m_tree.SetItemColor( itemSel, BLACK );
		m_tree.SetItemBold( itemSel, false );
		m_tree.RedrawWindow();
		m_buttonOverride.EnableWindow( true );
		m_buttonRemove.EnableWindow( false );
		m_editValue.EnableWindow( false );
	}
	else
		m_tree.DeleteItem( itemSel );

	iniTheme.DeleteValue( sKey, sName );
}