Usage of *.qrc file in vc2005
发布日期:2022-03-12 04:49:20 浏览次数:56 分类:技术文章

本文共 1066 字,大约阅读时间需要 3 分钟。

1. Create a qrc file or copy & paste one from another project.

2. Add the qrc file to vc project.

3. Prepare image files and store them to a place close to qrc file, better be in the same directory with qrc file.

4. Edit qrc file, key-in those image files' relative path as entries to qrc file, just like this

images/image1/somepicture1.png
images/image1/somepicture2.png
images/image2/somepicture1.png
images/image2/somepicture2.png

5. Right click the qrc file from vc project, and set the file's property, adding the image files' relative path (relative to vc's project file, *.vcproj) to "dependency items" of "customized generation steps".

6. Right click the qrc file and "Compile" it.

All getThemeIcon functions' parameter, typically a image file name without directory path, should have its relative path (relative to qrc file itself) in qrc file and its virtual relative path (relative to vcproj file) in "dependency items".

转载于:https://www.cnblogs.com/wincker/archive/2011/10/03/2198421.html

转载地址:https://blog.csdn.net/weixin_30348519/article/details/98111582 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:JSP网页设计
下一篇:菜根谭#13

发表评论

最新留言

关注你微信了!
[***.104.42.241]2024年03月28日 14时22分06秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章