I'm attempting to create a class for my own Select File dialog box for use in my programs. It's my first attempt at making a dialog box without the resource editor (Resource View, whatever). So far I've had some luck using InitModalIndirect() and such. What I don't know how to do, though, is include an icon for it to use. I could manually add an icon to my every project and use it, but I'd like to encapsulate everything within a single #include.

I don't have a very good understanding of project resources. As far as I've seen, they seem pretty cut off from source code and such. Still, I was wondering: is there a way to use #includes to embed, say, an icon file into your executable? I tried including my own attempt at a resource file, but it seemed to treat it as source code.

As you can see, I don't really know what I'm doing; but I was hoping someone might have some comments. What's possible?

(If nothing else, I'm likely to try writing source code with variables storing the image information, attempt to make a CBitmap out of them, and finally get an icon out of that.)

Any advice welcome;
Thanks,
-convoluted Jarvis