void COptionsDirectoriesPage::UseSelectedClicked(UINT /*Code*/, int id, HWND /*ctl*/)
{
	CModifiedButton * Button = NULL;
	switch (id)
	{
	case IDC_PLUGIN_DEFAULT: Button = &m_PluginDefault; break;
	case IDC_PLUGIN_OTHER: Button = &m_PluginDefault; break;
	case IDC_AUTO_DEFAULT: Button = &m_AutoSaveDefault; break;
	case IDC_AUTO_OTHER: Button = &m_AutoSaveDefault; break;
	case IDC_INSTANT_DEFAULT: Button = &m_InstantDefault; break;
	case IDC_INSTANT_OTHER: Button = &m_InstantDefault; break;
	case IDC_SNAP_DEFAULT: Button = &m_ScreenShotDefault; break;
	case IDC_SNAP_OTHER: Button = &m_ScreenShotDefault; break;
	case IDC_TEXTURE_DEFAULT: Button = &m_TextureDefault; break;
	case IDC_TEXTURE_OTHER: Button = &m_TextureDefault; break;
	}

	if (Button == NULL)
	{
		return;
	}

	if (!Button->IsChanged() || Button->IsReset())
	{
		if ((int)Button->GetMenu() == id)
		{
			return;
		}
	}
	Button->SetChanged(true);
	SendMessage(GetParent(), PSM_CHANGED, (WPARAM)m_hWnd, 0);
}
void COptionsDirectoriesPage::UpdateDefaultSelected(CModifiedButton & Button, SettingID Type)
{
	if (Button.IsChanged())
	{
		bool bUseSelected = (Button.GetCheck() & BST_CHECKED) == 0;
		g_Settings->SaveBool(Type, bUseSelected);

		if (Type == Directory_TextureUseSelected && !bUseSelected)
		{
			g_Settings->DeleteSetting(Directory_TextureSelected);
		}
	}
	if (Button.IsReset())
	{
		g_Settings->DeleteSetting(Type);
	}
}