How to Embed/Link binary data into a Windows module

前端 未结 2 532
無奈伤痛
無奈伤痛 2020-11-30 10:24

So I have a Visual Studio 2008 project which has a large amount of binary data that it is currently referencing. I would like to package the binary data much like you can do

相关标签:
2条回答
  • 2020-11-30 11:00

    You can embed the binary data as a C language array - no resources involved at all. An old classic trick. see for example XD

    0 讨论(0)
  • 2020-11-30 11:06
    1. Right click the resource script (.rc file)
    2. Choose Import

    http://msdn.microsoft.com/en-us/library/saced6x2.aspx

    You can embed any "custom" file you want, as well as things like .bmps and stuff VisualStudio "knows" how to edit. Then you can access them with your framework's resource functions like FindResource LoadResource etc...

    If you don't have a resource script.

    1. Click Project
    2. Add New Item
    3. Resource Script

    http://msdn.microsoft.com/en-us/library/sxdy04be(v=VS.71).aspx

    0 讨论(0)
提交回复
热议问题