[WM]. netcf/C ++ deploy your resources in the project (Getting Started)

Source: Internet
Author: User

Many newbie contacts WM and will not be able to find resources (especially images, files, and so on). Here I would like to introduce this simple knowledge:

1. WM originated from wince. In the file system, only the root directory \ and the full path relative to the root directory, such as \ Program Files \ A \ B .txt

Therefore, when reading files or other resources, you must first understand your path and check whether the resource is correct.

2. In the. net cf project, it is relatively simple to deploy resources to the corresponding simulators or devices.

The specific operation is: Add resources to your project (or simply CTR-V), and right-click your resources-> propertis (properties)-> copy to output dictionary, set this entry to copy always (always copy.

In this way, yourProgramWhen running (F5) or you take the initiative to deploy (deployment), resources will be copied to the deployment directory of the program.

3. In fact, this can also be implemented in the C/C ++ Project (by our boss ).

Right-click the project and choose propertis> Configuration Properties> deployment> additional files. You can add the file you want to add here. The syntax is as follows:

Name of the file to be deployed | directory where the file is located | where to deploy | 0

For example, if I want to deploy a.png under the res under the project directory to my project

A.png | $ (projectdir) \ res \ | % csidl_program_files % \ myproject | 0

If the syntax in your additional files is incorrect or the file cannot be found, the following error occurs in the output window of VC:

The system cannot find the specified file.Incorrect text. You need to check whether your file exists or not.

PS:

It can also be done in VC, but it is slightly more troublesome than C.

Related Article

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.