How to store and retrieve graphics before message box(Graphics rectangle) in c or c++
Like in windows application when some event occurs, message box is appeared, click OK then previ开发者_JAVA技巧ous window appears. Is it possible with c, c++ graphics application that display message box when some event occurs? It should show message box(rectangle graphic) and when pressed OK, it will disappear and displays previous screen (before message box appears).
I am using TC++ editor...
(In addition to previous answer) Another common way is to redraw all regions which lied under message box using the way they drawn previously.
You did not mention any library you use. A common way is:
- Save the region of the screen (described by a rectangle)
- Draw the message box.
- Restore the previously saved region to let the box disappear.
精彩评论