将文件作为资源放入VC工程中?在运行时从EXE文件中提取(释放)出这个文件?

来源:互联网 发布:linux 命令行 复制内容 编辑:程序博客网 时间:2024/06/05 04:46

来自:http://blog.csdn.net/vcleaner/archive/2005/07/27/436066.aspx

 

1. In VC IDE,add new resource type such as "RES_DATA",then add your file to the project

resource as the new type.

 

2. Fetch your file from executable file at runtime,can use follow function:


 

3.
Use this function such as this format:
Res2File( MAKEINTRESOURCE(ID_RES_DATA), "RES_DATA", "C://FontRes.TTF" );

 

原创粉丝点击