Beispiel #1
0
/*	HandleItemHit(theDialog, itemID, dsp)
	
	Called when the item identified by itemID is hit.
	Carries out any actions necessitated by the hit.
*/
static void
HandleItemHit(XOP_DIALOG_REF theDialog, int itemID, DialogStorage* dsp)
{
	int selItem;
	double d1;
	
	if (ItemIsPopMenu(theDialog, itemID))
		GetPopMenu(theDialog, itemID, &selItem, NULL);
	
	switch(itemID) {
		case SCALING_OFFSET_TEXT:
			dsp->offsetNoGood = GetDDouble(theDialog, SCALING_OFFSET_TEXT, &d1);
			break;
		
		case SCALING_MULTIPLIER_TEXT:
			dsp->multiplierNoGood = GetDDouble(theDialog, SCALING_MULTIPLIER_TEXT, &d1);
			break;
		
		case OK_BUTTON:
			ProcessOK(theDialog, dsp);
			break;
	}

	UpdateDialogItems(theDialog, dsp);
}
Beispiel #2
0
void 
BlobMgmt::OnDlgProcWmCommand(WPARAM wparam, LPARAM lparam)
{
    switch(LOWORD(wparam))
	{
	case IDCANCEL:
		
		if(ProcessCancel() == wyTrue)
			VERIFY(yog_enddialog(m_hwnddlg, 0));
		break;
    
	case IDOK:
		if(ProcessOK() == wyTrue)
		    VERIFY(yog_enddialog(m_hwnddlg, 1));
        else
            VERIFY(yog_enddialog(m_hwnddlg, 0));
		break;

	case IDC_SAVETOFILE:
		SaveToFile();
		break;

	case IDC_IMPORT:
		OpenFromFile();
		break;

	case IDC_SETNULL:
		{
			// if a user has selected it then we disable evrything
			// otherwise enable everything
			if(Button_GetCheck((HWND)lparam)== BST_CHECKED)
				DisableAll(wyTrue);
			else 
				DisableAll(wyFalse);
		}
	break;	
	case IDC_COMBO:
		{
			if((HIWORD(wparam))== CBN_SELENDOK)
				OnComboChange();
			break;
		}
	}
    return;
}