这篇教程C++ ERROR2IF函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中ERROR2IF函数的典型用法代码示例。如果您正苦于以下问题:C++ ERROR2IF函数的具体用法?C++ ERROR2IF怎么用?C++ ERROR2IF使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了ERROR2IF函数的21个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: ERROR2IFBOOL BfxPixelOp::SetBitmap(KernelBitmap * pKB, DWORD theCacheStateMask, DWORD theCacheValueMask, BOOL theDefaultValue){ Base = NULL; ERROR2IF( ((!pKB) || (pKB->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap"); ERROR3IF( (!(pKB->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency"); BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(pKB->ActualBitmap))->BMInfo->bmiHeader); ERROR2IF( (BPP && pBMI->biBitCount != BPP), FALSE, "BfxPixelOp called with incorrect BPP"); Base = (DWORD *)(void *)(((CWxBitmap *)(pKB->ActualBitmap))->BMBytes); Width = pBMI->biWidth; INT32 Bits = pBMI->biBitCount; switch (Bits) { case 1 : WidthRounded = (Width+31) &~31; break; case 2 : WidthRounded = (Width+15) &~15; break; case 4 : WidthRounded = (Width+7) &~7; break; case 8 : WidthRounded = (Width+3) &~3; break; case 16: WidthRounded = (Width+1) &~1; break; case 32: default: WidthRounded = Width; break; } Height = pBMI->biHeight; Size = (pBMI->biSizeImage)>>2; return TRUE;}
开发者ID:UIKit0,项目名称:xara-xtreme,代码行数:31,
示例2: TRACEUSERBOOL PointersTab::CommitSection(){TRACEUSER( "Neville", _T("commit PointersTab section/n")); ERROR2IF(pPrefsDlg == NULL,FALSE,"PointersTab::CommitSection called with no dialog pointer"); BOOL ok = pPrefsDlg->TalkToPage(_R(IDD_OPTSTAB_POINTERS)); // The pointers page identifier if (!ok) return TRUE; // Talk to page failed to return now // Section = Pointers // Ok has been pressed so take the values from this section of the dialog box BOOL Valid=FALSE; // Flag for validity of value// BOOL State=FALSE; // Flag for state of button/switch BOOL SetOk=TRUE; // Preference value set ok // Middle button removed for now as nothing seems to use it. // 0, 1 or 2 indicating Left Middle or Right mouse button ButtonFunction LeftButton = (ButtonFunction)pPrefsDlg->GetSelectedValueIndex(_R(IDC_OPTS_LEFTBUTTON));// ButtonFunction MiddleButton = (ButtonFunction)pPrefsDlg->GetSelectedValueIndex(_R(IDC_OPTS_MIDDLEBUTTON)); ButtonFunction RightButton = (ButtonFunction)pPrefsDlg->GetSelectedValueIndex(_R(IDC_OPTS_RIGHTBUTTON)); ClickModifiers::SetButtonFunc(0, LeftButton);// ClickModifiers::SetButtonFunc(1, MiddleButton); ClickModifiers::SetButtonFunc(2, RightButton); // All units work off the selected document and so we must do nothing if there is no // selected document. Check our clas variable to see if this is true or not. // Units should have been set up by the caller. if (pDocument == NULL || pSpread == NULL) return (TRUE); // Now the magnetic radii INT32 LineRadius = 0; INT32 PointRadius = 0; LineRadius = pPrefsDlg->GetUnitGadgetValue(_R(IDC_OPTS_LINERADIUS), CurrentPageUnits, 0, INT_MAX, _R(IDE_OPTS_INVALIDLINERAD), &Valid);TRACEUSER( "Neville", _T("commit LineRadius distance='%d' Valid ='%d'/n"),LineRadius, Valid); if (Valid) { SetOk = Camelot.SetPrefValue(TEXT("Magnetic Options"), TEXT("Line Radius"), &LineRadius); ERROR2IF(!SetOk,2,_R(IDE_OPTS_SETPREF_EDIT)); } else return FALSE; // Magnetic line radius incorrect, user has been warned already PointRadius = pPrefsDlg->GetUnitGadgetValue(_R(IDC_OPTS_POINTRADIUS), CurrentPageUnits, 0, INT_MAX, _R(IDE_OPTS_INVALIDPOINTRAD), &Valid);TRACEUSER( "Neville", _T("commit PointRadius distance='%d' Valid ='%d'/n"),PointRadius, Valid); if (Valid) { SetOk = Camelot.SetPrefValue(TEXT("Magnetic Options"), TEXT("Point Radius"), &PointRadius); ERROR2IF(!SetOk,2,_R(IDE_OPTS_SETPREF_EDIT)); } else return FALSE; // Magnetic point radius incorrect, user has been warned already return TRUE;}
开发者ID:Amadiro,项目名称:xara-cairo,代码行数:60,
示例3: Peter_Arnold/********************************************************************************************> BOOL EllipseTool::Init() Author: Peter_Arnold (Xara Group Ltd) <[email C++ ERROR3IF函数代码示例 C++ ERROR0函数代码示例
|