creating a skin

I want to make the background of my window be set to .bmp file my friend made for me. i have been scouring the web for how to do this, and all i have encountered is a vague description of using CWndImage that i really cant understand too well. From what i've been able to comprehend, it seems as though i have to create a seperate dialog box just to do this??? Can i not just set the background to that bmp without doing that??

... you seem to be using MFC ... i can only tell you the WinAPI way, but maybe this still helps:

you load the bitmap via LoadBitmap(). In the WndProc, you capture WM_PAINT and there you BitBlt()/StretchBlt() the bitmap to the DC you get via GetDC(handle) where "handle" is your windowīs HWND.
(maybe select() first? not sure - i am at home and donīt have any code about this around and i am too lazy right now to look it up on the MSDN)

i appreciate ur help, but excuse my stupidity plz. i thought that i had to go to file<open and open the bmp, but when i try to do this it says " the file has been loaded correctly but b/c it contains more than 256 colors it cannot be loaded into the bitmap editor."

I am not sure how you are trying to load the bitmap (you did not tell yet which environment you are using, but i guess MSVC++)
The "256 color error" though makes me think that you are using BC++ because borlandīs bitmap editor didnīt support 24bit bitmaps for a long time (not sure if it does today...)

On the other hand, this is not really important because:
LoadBitmap() is a GDI function. It returns a HBITMAP that iirc can be used in BitBlt() / StretchBlt() functions. If it does not work, you can use GetDC(hBitmap) to get a device context to the handle and BitBlit()/StretchBlt() from that DC to your windowīs DC.

Could you make it work like that?

I have to add that i am doing very few WinAPI stuff - only when i really need to. Mostly i am doing Delphi (the WinAPI is important there too for problems like yours, but itīs much less complicated as i get DCs and handles automatically in Delphi. But other than that, it is the very same as in C).

If you canīt get it to work, "worstcase" would be to wait till monday. Either one of the C pros here will have answered or I am at work and have access to the programs i did there so i can post some "real" code. I just sent a reminder to myself :)

I wonīt reply today anymore, itīs 00:00 here and iīm going to bed now... good night! and good luck.

yes i am using msvc++. i was going to file menu, and then selecting open and selecting my bmp file. i am not even sure if this is the correct way to do this. In order to use the LoadBitmap() function i was assuming that i had to have the bmp already loaded as a resource. I can't get it to load as a resource, or perhaps i am doing it incorrectly b/c i have never done this b4. Thanks for ur help, i do appreciate it. If anyone else out there knows what im doing wrong please tell me the correct way.

ahh finally i have figured this out. a little more complex than i thought it would be. i ended up needing a few more functions but i found a tutorial that explained it pretty well. MHirsch thanks for ur help it got me pointed in the right direction.

You must 'catch' any GDI resource (and replace ) returned from a SelectObject() call.

Any drawing GDI resource or BMP can not be deleted/released while selected into a HDC.

>>Load the bitmap in the WM_CREATE part and free it in the WM_DESTROY part.

Make sure you make its handle static.

The essence of Christianity is told us in the Garden of Eden history. The fruit that was forbidden was on the Tree of Knowledge. The subtext is, All the suffering you have is because you wanted to find out what was going on. You could be in the Garden of Eden if you had just kept your f***ing mouth shut and hadn't asked any questions.