Ejemplo n.º 1
0
/*----------------------------------------------------------------------------------------------
	Respond to any of the items in the Insert submenu.
	@param pcmd Menu command info.
	@return true to stop further processing.
----------------------------------------------------------------------------------------------*/
bool CleDeSplitChild::InsertEntry(Cmd * pcmd)
{
	AssertPtr(pcmd);

	CleMainWnd * pcmw = dynamic_cast<CleMainWnd *>(MainWindow());
	if (pcmw)
	{
		switch (pcmd->m_cid)
		{
		case kcidInsItem:
			::SendMessage(pcmw->Hwnd(), WM_COMMAND, kcidInsListItem, 0);
			return true;
		case kcidInsItemBef:
			::SendMessage(pcmw->Hwnd(), WM_COMMAND, kcidInsListItemBef, 0);
			return true;
		case kcidInsItemAft:
			::SendMessage(pcmw->Hwnd(), WM_COMMAND, kcidInsListItemAft, 0);
			return true;
		case kcidInsSubItem:
			::SendMessage(pcmw->Hwnd(), WM_COMMAND, kcidInsListSubItem, 0);
			return true;
		default:
			return false;
		}
	}
	return false;
}