如何在C ++中添加背景? [英] How to add background in C++ ?
本文介绍了如何在C ++中添加背景?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用C ++制作超级马里奥,但我不知道如何添加背景图像,例如山脉和云的经典图像。有人可以帮帮我吗?
我尝试过的事情:
i我已经尝试过搜索很多网站但是Alas什么都没有
I am making Super Mario in C++ , But i dont know how to add background image in that like for example the classic image of mountains and clouds. Can someone help me out ?
What I have tried:
i have tried searching many sites but Alas nothing available
推荐答案
背景图片是你绘制的第一张图片,而不是它上面的所有图片。如果您使用Windows,则应在 WM_ERASEBKGND <中绘制图像。 / a>消息处理程序。
The background image is the first you draw and than all pictures over it. If you use Windows you should draw the image in the WM_ERASEBKGND message handler.
这篇关于如何在C ++中添加背景?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文