How to clear the drawings?
-
Dear Everyone; I have got a picture control placed on top of an activex control (web broswer).Just to make th eproblem clearer i had to do some drawings on top of the web browser. I have then subclassed the picture control and overriden its OnPaint() function. I am doing some drawings in the overridden OnPaint(). Now, everytime the user clicks on a button "Draw" a flag is set to TRUE in the overriden OnPaint() and some shapes are drawn. The drawings are done fine :-) I have another button "Clear" that is supposed to clear the previous drawings. How do i clear what i have drawn ?? Thank you :) llp00na
-
Dear Everyone; I have got a picture control placed on top of an activex control (web broswer).Just to make th eproblem clearer i had to do some drawings on top of the web browser. I have then subclassed the picture control and overriden its OnPaint() function. I am doing some drawings in the overridden OnPaint(). Now, everytime the user clicks on a button "Draw" a flag is set to TRUE in the overriden OnPaint() and some shapes are drawn. The drawings are done fine :-) I have another button "Clear" that is supposed to clear the previous drawings. How do i clear what i have drawn ?? Thank you :) llp00na
-
Dear Everyone; I have got a picture control placed on top of an activex control (web broswer).Just to make th eproblem clearer i had to do some drawings on top of the web browser. I have then subclassed the picture control and overriden its OnPaint() function. I am doing some drawings in the overridden OnPaint(). Now, everytime the user clicks on a button "Draw" a flag is set to TRUE in the overriden OnPaint() and some shapes are drawn. The drawings are done fine :-) I have another button "Clear" that is supposed to clear the previous drawings. How do i clear what i have drawn ?? Thank you :) llp00na
Cédric Moonen is absolutely correct; that is the simplist solution. :-D But since you say you have a picture control placed on top of the other window, why don't you just hide it. The problem with not drawing anything when OnPaint() is called (for the picture control) is that the picture control is still there and it may call a function to erase the background before calling OnPaint(), which would leave an empty blank spot on the screen. Just some thoughts, INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
-
Dear Everyone; I have got a picture control placed on top of an activex control (web broswer).Just to make th eproblem clearer i had to do some drawings on top of the web browser. I have then subclassed the picture control and overriden its OnPaint() function. I am doing some drawings in the overridden OnPaint(). Now, everytime the user clicks on a button "Draw" a flag is set to TRUE in the overriden OnPaint() and some shapes are drawn. The drawings are done fine :-) I have another button "Clear" that is supposed to clear the previous drawings. How do i clear what i have drawn ?? Thank you :) llp00na
Maybe for you task is more appropriate to hide your picture control? When you click the Clear button, you can call
m_cMyPicture.ShowWindow(SW_HIDE)
function for your picture, and when you click the Draw button you can executem_cMyPicture.ShowWindow(SW_SHOWNA)
. Now you do not need to check a flag inOnPaint
. -
Maybe for you task is more appropriate to hide your picture control? When you click the Clear button, you can call
m_cMyPicture.ShowWindow(SW_HIDE)
function for your picture, and when you click the Draw button you can executem_cMyPicture.ShowWindow(SW_SHOWNA)
. Now you do not need to check a flag inOnPaint
.hi dear i am sorry i put my problem but u dont ans me so plz tel me result for this cn u send me an example as i easily undestand i hav three dialog boxes third dialog box contain menu i want that when i goto third dialog box from first dialog box then its menu are disabled but when i go from second dialog box third dialog box menues are not disabled. plz send me code how to do it note : specially for viorel Please mail me
-
Cédric Moonen is absolutely correct; that is the simplist solution. :-D But since you say you have a picture control placed on top of the other window, why don't you just hide it. The problem with not drawing anything when OnPaint() is called (for the picture control) is that the picture control is still there and it may call a function to erase the background before calling OnPaint(), which would leave an empty blank spot on the screen. Just some thoughts, INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
-
Maybe for you task is more appropriate to hide your picture control? When you click the Clear button, you can call
m_cMyPicture.ShowWindow(SW_HIDE)
function for your picture, and when you click the Draw button you can executem_cMyPicture.ShowWindow(SW_SHOWNA)
. Now you do not need to check a flag inOnPaint
. -