您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ HLock函数代码示例

51自学网 2021-06-01 21:23:31
  C++
这篇教程C++ HLock函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中HLock函数的典型用法代码示例。如果您正苦于以下问题:C++ HLock函数的具体用法?C++ HLock怎么用?C++ HLock使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了HLock函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: DrawImage

void DrawImage( void ){    OSErr  err = noErr;    Handle hOpenTypeList = NewHandle(0);    long   numTypes = 0;    FSSpec theFSSpec;    Rect   bounds;    GraphicsImportComponent importer = 0;    BuildGraphicsImporterValidFileTypes( hOpenTypeList, &numTypes );    HLock( hOpenTypeList );    err = GetOneFileWithPreview(numTypes, (OSTypePtr)*hOpenTypeList, &theFSSpec, NULL);    DisposeHandle( hOpenTypeList );    if ( err ) return;    // locate and open a graphics importer component which can be used to draw the    // selected file. If a suitable importer is not found the ComponentInstance    // is set to NULL.    err = GetGraphicsImporterForFile( &theFSSpec,	// specifies the file to be drawn                                      &importer );	// pointer to the returned GraphicsImporterComponent    // get the native size of the image associated with the importer    err = GraphicsImportGetNaturalBounds( importer, 	// importer instance                                          &bounds );	// returned bounds    OffsetRect( &bounds, 10, 45 );    window = NewCWindow( NULL, &bounds, "/pDraw Image", true, documentProc, (WindowPtr)-1, true, 0);    // set the graphics port for drawing    err = GraphicsImportSetGWorld( importer,				// importer instance                                   GetWindowPort( window ),	// destination graphics port or GWorld                                   NULL );					// destination GDevice, set to NULL uses GWorlds device    // draw the image    err = GraphicsImportDraw( importer );    // close the importer instance    CloseComponent( importer );}
开发者ID:fruitsamples,项目名称:ImproveYourImage,代码行数:40,


示例2: P0

P0(PUBLIC pascal trap, LONGINT, UnloadScrap){    OSErr retval;    INTEGER f;    LONGINT l = Cx(ScrapSize);        if (Cx(ScrapState) > 0) {        retval = cropen(&f);        if (retval != noErr)/*-->*/     return(retval);        HLock(MR(ScrapHandle));        retval = FSWriteAll(f, &l, STARH(MR(ScrapHandle)));        HUnlock(MR(ScrapHandle));        if (retval != noErr)/*-->*/     return(retval);        retval = FSClose(f);        if (retval != noErr)/*-->*/     return(retval);        ScrapState = 0;    }    return noErr;}
开发者ID:LarBob,项目名称:executor,代码行数:22,


示例3: CurResFile

//_______________________________________________________________________________OSErr WriteRsrc	(Handle rsrc, ResType type, short ID, short	resFile){	OSErr err; Handle h;	short saved;		saved = CurResFile();	UseResFile( resFile);	if ((err= ResError())!=noErr)	return err;		h= GetResource (type, ID);	if (h) RemoveResource (h);	HLock (rsrc);	AddResource( rsrc, type, ID, "/p");	err= ResError();	if( err== noErr) {		UpdateResFile( resFile);		err= ResError();	}	HUnlock( rsrc);	UseResFile( saved);	return err;}
开发者ID:AntonLanghoff,项目名称:whitecatlib,代码行数:23,


万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。