How to draw to screen in c++?

前端 未结 4 725
一个人的身影
一个人的身影 2021-02-06 08:09

How would I draw something on the screen ? not the console window but the entire screen, preferably with the console minimised.

Also, would it show up on a printscreen ?

4条回答
  •  一向
    一向 (楼主)
    2021-02-06 09:01

    C++ has no notion of a "screen" and especially none of "graphics". The functionality needed is provided by your operating system. On many systems you will need a "Window" and draw on it. To do this portably, a library like Qt might help. A Windows solution was given by Oops. Maybe you want to use some OpenGL library, or Windows' DirectDraw/Direct3D from DirectX, in case you want to do some 3D stuff with your graphics.

提交回复
热议问题