New Programmer/Wannabe Here
well i was just fooling around with c++, and i cant seem to figure out how to put a background image onto the back of my program (where the default gray would be) any help please?
Wow are you being non-specific. You ARE new here! What are you using? OpenGL? Plain Win32?
Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
"The answer is out there."
"Please help, I''m using Windows!"
Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
"The answer is out there."
"Please help, I''m using Windows!"
LOGBRUSH background;background.lbStyle = BS_PATTERN;background.lbHatch = (long) LoadImage(hInstance,"Bitmap.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); wndclass.hbrBackground = CreateBrushIndirect(&background);
Or something like that. Look up LOGBRUSH and LoadImage in MSDN for more details.
- seb
im using a regular win32 prog, in c++... where do i put the code? and where do i put the image that i made for it?
In your winmain somewhere you''ll ahve something along the lines of wndclass.hbrbackground = ....
Replace that line with all of the above. If you don''t have that line just chuck all of the above in with the other wndclass.property initialisations.
If you don''t know what I''m talking about look up WNDCLASS on msdn.
Just put the bitmap in the same folder as your source code file and change the code above to suit what you''ve called your file.
- seb
Replace that line with all of the above. If you don''t have that line just chuck all of the above in with the other wndclass.property initialisations.
If you don''t know what I''m talking about look up WNDCLASS on msdn.
Just put the bitmap in the same folder as your source code file and change the code above to suit what you''ve called your file.
- seb
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement