Exemplo n.º 1
0
bool LoadCtrl::OnCommand (int ctrlId, int notifyCode) throw (Win::Exception)
{
	if (ctrlId == IDOK || ctrlId == IDC_LIST && notifyCode == LBN_DBLCLK)
	{
		if (_listBox.GetSelectedPath (GetWindow (), GetBuffer (), GetBufLen ()))
		{
			// directory selected
			ChangeDirectory ();
		}
		else if (_listBox.IsSelection ())
			EndOk ();
		else
			EndCancel ();
		return true;
	}
	else if (ctrlId == IDCANCEL)
	{
		EndCancel ();
		return true;
	}
	return false;
}
Exemplo n.º 2
0
// Note: Strictly speaking, this method doesn't have to be overridden
// It has the correct default implementation.
bool AboutDlgHandler::OnApply () throw ()
{
	EndOk ();
	return true;
}