Пример #1
0
LRESULT CObjectView::ChildReaction(SpaceRectionMsg* srm){
	switch(srm->Msg)
	{
	case OBJECT_ADD:
        OnAddObject(srm->wParam,srm->lParam);
		break;
	case OBJECT_DEL:
		OnDeleteObject(srm->wParam,srm->lParam);
		break;
	case OBJECT_FIND:
		OnFindObject(srm->wParam,srm->lParam);
	case OBJECT_CLR:
		OnClearAll(srm->wParam,srm->lParam);
	    break;
	case OBJECT_SETTITLE:
		OnSetTitle(srm->wParam,srm->lParam);
	}
	return 0;
}
Пример #2
0
void CObjectView::SetHeaderText(tstring Title,BOOL Enable){
	if(GetHwnd())
		SendChildMessage(GetHwnd(),OBJECT_SETTITLE,(int64)Title.c_str(),(int64)Enable);
	else
		OnSetTitle((int64)Title.c_str(),(int64)Enable);
}
Пример #3
0
// Handles a menu item selection
LRESULT CNoteDlg::OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
	switch (LOWORD(wParam))
	{
	case IDR_MENU_NEWNOTE:
		OnNewNote();
		break;
	case IDR_MENU_SAVE:
		OnSave(true);
		break;
	case IDR_MENU_SAVETOFILE:
		OnSaveToFile();
		break;
	case IDR_MENU_IMPORTFROMFILE:
		OnImportFromFile();
		break;
	case IDR_MENU_DELETE:
		OnDelete();
		break;
	case IDR_MENU_SETFONT:
		OnSetFont();
		break;
	case ID_EDIT_SETTITLE:
		OnSetTitle();
		break;
	case IDR_MENU_CLOSE:
		CloseDialog(0);
		break;
	case IDR_MENU_BLUE:
		OnChangeBkgndColor(BLUE);
		break;
	case IDR_MENU_GREEN:
		OnChangeBkgndColor(GREEN);
		break;
	case IDR_MENU_PINK:
		OnChangeBkgndColor(PINK);
		break;
	case IDR_MENU_YELLOW:
		OnChangeBkgndColor(YELLOW);
		break;
	case IDR_MENU_WHITE:
		OnChangeBkgndColor(WHITE);
		break;
	case IDR_MENU_0:
		MakeTransparent(255);
		break;
	case IDR_MENU_10:
		MakeTransparent(225);
		break;
	case IDR_MENU_20:
		MakeTransparent(200);
		break;
	case IDR_MENU_30:
		MakeTransparent(175);
		break;
	case IDR_MENU_40:
		MakeTransparent(150);
		break;
	case IDR_MENU_50:
		MakeTransparent(125);
		break;
	case IDR_MENU_60:
		MakeTransparent(100);
		break;
	case IDR_MENU_70:
		MakeTransparent(75);
		break;
	case IDR_MENU_80:
		MakeTransparent(50);
		break;
	case IDR_MENU_90:
		MakeTransparent(25);
		break;
	case ID_FILE_PAGE_SETUP:
		OnPageSetup();
		break;
	case ID_FILE_PRINT:
		OnPrint();
		break;
	default:
		break;
	}

	return 0;
}