开发者_Python百科
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this questionWhat header file should I include to use graphics in Visual C++? I use Visual Studio 2010. Thank you in advance!
"Graphics" is a broad subject. Native Win32 applications do not require any extra libraries but are very low level (ie You write a lot of code yourself). I found this website very useful. You can find others by searching up "win32 tutorial". You will need to include "windows.h" and possibly "windowsx.h" for this.
Two main competing APIs (Application Programming Interfaces) are DirectX and OpenGL. You can search them up as they are widely used for graphics and you should get some good resources and tutorials. These two will may need extra libraries which you can get from the internet (just search it). For DirectX the headers, it will vary on which version of DirectX you use and OpenGL will require "gl/gl.h" and possibly others depending on what you want to do.
精彩评论