Brew resource file overview and Problems

Source: Internet
Author: User

1.1 Brew The built-in resource editor can store strings, images, data, and other resources for convenient and unified management, and can solve the problem of multi-language text encoding. 1.2 , In Brew 2.1 Inside: ① The resource editor is embedded in Brew SDK Installed Brew SDK You can use the resource editor. ② Resource file is *. Bri Format, generate 2 files *. Bar And *. H ; 1.3 , In Brew 3.1 Inside: ① The resource editor is an extension tool, independent Brew SDK Besides, no matter whether it is installed or not Brew SDK , You must install one Brew SDK too ( The current version is 1.0.1 ) To use the resource editor; ② Resource file is *. Brx Format, generate 2 files *. Bar And *. BRH ; ③ In 3.1 Generated in *. BRH File can be manually Renamed *. H , Convenience VC Debugging in; it seems like 3.1 Instead 2.1 More troublesome. I don't know what Qualcomm thinks. ^_^ Note: A very important issue is that the resource file name should not be capitalized. For example, my_res.bri and Myres. brx are correct, while my_res.bri and Myres. brx are incorrect. In Brew 2.1 Resource files on the platform use uppercase letters and can run properly on the simulator, which means problems may occur on the real machine. Brew 3.1 If the resource file on is capitalized, an error occurs on the simulator, and the image cannot be loaded (this is a good improvement ). For example, put an image (test.bmp) in the resource and project root directory, and use the following Code : Ibitmap * pimg = ishell_loadbitmap (PME->. m_pishell, "test.bmp"); // load ibitmap * pimg = loadresbitmap (Pi-> m_pishell, "my_res.bar", (int16) res_id) directly from the file ); // The file name cannot be written directly from the resource (test.bmp is incorrect), and the 2nd-sentence code is loaded from the resource file. If the resource file "my_res.bar" is normal, but "my_res.bar" is not loaded, always return null.

 
Retained the following information:
Author (author): smilelance
Time: 2006.09.12
Source (from): http://blog.csdn.net/smilelance

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.