User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 401,482 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,177 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Views: 321 | Replies: 2 | Solved
Reply
Join Date: Mar 2008
Posts: 19
Reputation: noraantonia is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
noraantonia noraantonia is offline Offline
Newbie Poster

how to clear/erase the content of the window in visual c++ 6.0?

  #1  
May 17th, 2008
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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2008
Location: Sivakasi, Tamilnadu, India
Posts: 396
Reputation: selvaganapathy is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 67
selvaganapathy's Avatar
selvaganapathy selvaganapathy is offline Offline
Posting Whiz

Re: how to clear/erase the content of the window in visual c++ 6.0?

  #2  
May 18th, 2008
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 );
KSG
Reply With Quote  
Join Date: Mar 2008
Posts: 19
Reputation: noraantonia is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
noraantonia noraantonia is offline Offline
Newbie Poster

Re: how to clear/erase the content of the window in visual c++ 6.0?

  #3  
May 18th, 2008
I did what you said and it works. Thank you very much
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 2:04 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC