Text color property not immediately applied in slide show mode

  • Thread starter Thread starter Nathanael
  • Start date Start date
N

Nathanael

I'm working with PowerPoint 2007/2003 developing in C++.

I've written code to insert text into a PowerPoint presentation. The code
works, but in slide show mode text is always inserted as black. I set the
color property of the text, but it isn't immediately visible.

When I insert a second text string, the first one changes to have the
correct that I applied to it. I can also get the right color to show up if I
switch back and forth between slides in the running presentation.

This problem only happens in slide show mode, the code works fine in edit
mode.

Here's what I'm doing:

m_TextRangePtr->SetText(szText);
m_FontPtr->AttachDispatch(m_TextRangePtr->GetFont());
m_ColorPtr->AttachDispatch (m_FontPtr->GetColor());
m_ColorPtr->SetRgb(m_clrText);
m_ColorPtr->ReleaseDispatch();
m_FontPtr->ReleaseDispatch();
m_TextRangePtr->ReleaseDispatch();
 
I really should have edited this better before I posted it ... hopefully this
is clearer...

I'm working with PowerPoint 2007/2003 developing in C++.

I've written code to insert text into a PowerPoint presentation. The code
works, but in slide show mode the text is always black after being inserted.
I set the color property of the text, but it isn't immediately visible.

When I insert a second text string, the first one changes to have the
correct color that I applied to it. I can also get the right color to show
up if I
switch back and forth between slides in the running presentation.

This problem only happens in slide show mode, the code works fine in edit
mode.

Here's what I'm doing:

m_TextRangePtr->SetText(szText);
m_FontPtr->AttachDispatch(m_TextRangePtr->GetFont());
m_ColorPtr->AttachDispatch (m_FontPtr->GetColor());
m_ColorPtr->SetRgb(m_clrText);
m_ColorPtr->ReleaseDispatch();
m_FontPtr->ReleaseDispatch();
m_TextRangePtr->ReleaseDispatch();
 
So I gave this a try. It seems that if you call GoToSlide and tell it to go
to your current slide, it doesn't force a redraw. (I'm assuming this is an
intentional optimization by Microsoft.)

Are there any ways to 'force' PowerPoint to refresh/redraw the current slide?

Thanks!
 
Back
Top