View Single Post
Old 05-24-2007, 09:24 AM   #18
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 15,746
Default

I guess I should just stick some pngs in the download. I sort of wanted a handsomer looking example plugin before doing that (the graphics in the example are fairly random). You might need to delete the references to nonexistent pngs, I'm not sure.

Anyway. Add your own image resource at described above. VS will then display the raw data (because it doesn't understand what a PNG is, if you added a BMP resource it would display the actual bitmap), with a label like "IDR_PNGX" in the tab over the data. Save the raw data file and close it to get it out of your way. In your plugin, that IDR_PNGX label can now be used to initialize an IBitmap.

Specifically what happens is when you compile, VS compiles the resources first, and creates a resource.h file that lists all the resource tags. If you #include "resource.h", then you can use the tag as a reference to the image.

This is all generic resource stuff, not specifically to do with IPlug (I'm happy to help with it, just being clear that these are generic issues and not IPlug specific issues).

Here is some MSDN stuff on using resources.

Last edited by schwa; 05-24-2007 at 09:38 AM. Reason: added MSDN link
schwa is offline   Reply With Quote