GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 23-Apr-2008, 12:27
komalwaseem komalwaseem is offline
New Member
 
Join Date: Apr 2008
Posts: 6
komalwaseem is on a distinguished road

MFC - drawing overlapping circles


In my program I take appropriate values from the user and then click a button to draw a circle on the same dialog box. However if I change the values and then again click the button to draw, my previous circle is erased and the new one is drawn. What I want is for the previous circles to stay there and not be erased every time a new circle is drawn. I guess it has something to do with how I use Invalidate() statement but Im not sure how to achieve this.
  #2  
Old 24-Apr-2008, 05:29
shabbi89 shabbi89 is offline
New Member
 
Join Date: Apr 2008
Posts: 1
shabbi89 is on a distinguished road

Re: MFC - drawing overlapping circles


Hi There,
The Problem is When You call Invalidate(); It refreshes the screen so there is only on basestation left on the screen for which you call the function.To show them all make a static counter in base station class and in paint function do this:
for(int i=0;i<=BaseStattionCount;i++)
{
obj.Ellipse (); //for every base station call the function
}
Hope it will work.
 
 

Recent GIDBlogToyota - 2008 July Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Drawing order Z_guy FLTK Forum 6 09-Sep-2007 12:57
Free Hand Drawing in FLTK nimeesh FLTK Forum 2 31-Aug-2007 02:58
How to save a drawing to the file amgturk MS Visual C++ / MFC Forum 2 25-Jul-2005 00:29
Undo Drawing Nelly MS Visual C++ / MFC Forum 3 10-May-2004 21:14
Back to the drawing board... spudtheimpaler C Programming Language 9 15-Mar-2004 10:12

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 23:21.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.