0

Hello,

I have a question. I work in visual c++ in a document/view arhitecture (SDI application) and i draw some stuff with some opengl functions (cubes, cylinders) but when i hit the "New" menu from the File menu it doesn't erase or clear my drawing I don't know why. Can you help me how to ovewrite eventually this : OnFileNew function, and where should i put it? In the CView class or in CMainFrame?
What should i write in it to erase my background after i draw something and to provide a clear canvas ?

Thank you in advance for your help.

2
Contributors
2
Replies
4
Views
9 Years
Discussion Span
Last Post by noraantonia
0

Hi
Use Invalidate() function to erase the entire client area. and it also call WM_PAINT message to redraw the client area void Invalidate( BOOL bErase = TRUE );

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.