Click here to Skip to main content
15,925,602 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Use a Web Browser to Call Command Shell in CGI C++ Pin
David Crow9-Jun-06 10:28
David Crow9-Jun-06 10:28 
QuestionRe: Use a Web Browser to Call Command Shell in CGI C++ Pin
Lynniz9-Jun-06 10:58
Lynniz9-Jun-06 10:58 
AnswerRe: Use a Web Browser to Call Command Shell in CGI C++ Pin
David Crow9-Jun-06 11:03
David Crow9-Jun-06 11:03 
AnswerRe: Use a Web Browser to Call Command Shell in CGI C++ Pin
Nemanja Trifunovic10-Jun-06 14:23
Nemanja Trifunovic10-Jun-06 14:23 
GeneralRe: Use a Web Browser to Call Command Shell in CGI C++ [modified] Pin
Lynniz12-Jun-06 1:51
Lynniz12-Jun-06 1:51 
Questionclearing a CDC Pin
ns9-Jun-06 9:34
ns9-Jun-06 9:34 
AnswerRe: clearing a CDC Pin
Cedric Moonen9-Jun-06 10:04
Cedric Moonen9-Jun-06 10:04 
GeneralRe: clearing a CDC Pin
bob169729-Jun-06 17:13
bob169729-Jun-06 17:13 
Cedric Moonen wrote:
just 'ask' for a repaint, that will erase everything

We all know what you meant but what you typed is a different story Wink | ;)

I'm just reading it from the thread issuer's view and if they take you literally, they'll just call Invalidate() in their button pressed handler which will ultimately generate the call to the OnDraw which drew the graph in the first place effectively redrawing it once again.

I'm guessing what you meant to say was in the button pressed handler, set some member variable to false like...

// declaration
BOOL m_bDrawGraph;

// constuctor
m_bDrawGraph=TRUE;

// On button pressed handler
m_bDrawGraph=FALSE;
Invalidate();

// OnDraw
if (m_bDrawGraph) {
// Draw the graph, etc...
} else {
// OnEraseBackground already cleared the background
// but you are free to draw something else here etc...
}

/* Don't forget that what goes up, must come down. Make sure to
provide some mechanism, such as another button and another handler
to set the m_bDrawGraph=TRUE when you want to see the graph again.
Don't forget to Invalidate() to force a redraw.

IMPORTANT: Remember that OnDraw gets called frequently, even when
you did not explicitly call Invalidate(). OnDraw needs to know what
to draw in your client area at any moment when someone drags
another window over your window which effectively wipes out part
of the graph so Windows politely Invalidates for you to "redraw"
the graph.
*/

Anyway, I apologize for the clarification but I hope it helps a little.
Questionstack question? Pin
G_S9-Jun-06 9:22
G_S9-Jun-06 9:22 
AnswerRe: stack question? Pin
David Crow9-Jun-06 10:26
David Crow9-Jun-06 10:26 
QuestionDefining my own escape sequences? Pin
CoffeeAddict199-Jun-06 7:26
CoffeeAddict199-Jun-06 7:26 
QuestionRe: Defining my own escape sequences? Pin
David Crow9-Jun-06 7:53
David Crow9-Jun-06 7:53 
AnswerRe: Defining my own escape sequences? [modified] Pin
CoffeeAddict199-Jun-06 8:15
CoffeeAddict199-Jun-06 8:15 
GeneralRe: Defining my own escape sequences? Pin
Zac Howland9-Jun-06 8:18
Zac Howland9-Jun-06 8:18 
GeneralRe: Defining my own escape sequences? Pin
David Crow9-Jun-06 8:31
David Crow9-Jun-06 8:31 
GeneralRe: Defining my own escape sequences? Pin
CoffeeAddict1910-Jun-06 7:13
CoffeeAddict1910-Jun-06 7:13 
GeneralRe: Defining my own escape sequences? Pin
David Crow12-Jun-06 2:32
David Crow12-Jun-06 2:32 
AnswerRe: Defining my own escape sequences? Pin
Zac Howland9-Jun-06 8:03
Zac Howland9-Jun-06 8:03 
QuestionRefresh/update Dialogs in TabCtrl ??? Pin
embeddedDude9-Jun-06 5:59
embeddedDude9-Jun-06 5:59 
QuestionNT Services with ADO Pin
almc9-Jun-06 5:22
almc9-Jun-06 5:22 
QuestionLinker Error 2001, yet again Pin
Fariborz_579-Jun-06 5:13
Fariborz_579-Jun-06 5:13 
AnswerRe: Linker Error 2001, yet again Pin
Zac Howland9-Jun-06 5:44
Zac Howland9-Jun-06 5:44 
Question_Iterator_base sometimes struct, sometimes class Pin
Federico Milano9-Jun-06 4:51
Federico Milano9-Jun-06 4:51 
Questionproblem with dialog procedure Pin
fury 849-Jun-06 4:47
fury 849-Jun-06 4:47 
AnswerRe: problem with dialog procedure Pin
David Crow9-Jun-06 5:28
David Crow9-Jun-06 5:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.