Click here to Skip to main content
15,896,359 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: load image fail Pin
namaskaaram15-Nov-04 21:44
namaskaaram15-Nov-04 21:44 
GeneralRe: load image fail Pin
vc-programmer-15-Nov-04 21:59
vc-programmer-15-Nov-04 21:59 
GeneralRe: load image fail Pin
namaskaaram15-Nov-04 22:26
namaskaaram15-Nov-04 22:26 
GeneralTreeviw control and Unicode Pin
Alpha Siera15-Nov-04 17:46
Alpha Siera15-Nov-04 17:46 
GeneralHelp Pin
James198515-Nov-04 16:14
James198515-Nov-04 16:14 
GeneralRe: Help Pin
ThatsAlok15-Nov-04 23:10
ThatsAlok15-Nov-04 23:10 
QuestionHow to change font color of slide? Pin
cengyikun52115-Nov-04 15:33
susscengyikun52115-Nov-04 15:33 
AnswerRe: How to change font color of slide? Pin
cengyikun16-Nov-04 14:12
susscengyikun16-Nov-04 14:12 
Hello everyone,
My question is how to change the font color of slide.
I have Automated PowerPoint Using Visual C++ MFC,such as:
_Application app;
Presentations presentations;
_Presentation presentation;
Slides slides;
_Slide slide;
ShapeRange shaperange;
Shapes shapes;
Shape shape;
TextFrame textframe;
TextRange textrange;
Font font;
FillFormat fillformat;
ColorFormat colorformat;
ShadowFormat shadow;

if(!app.CreateDispatch("Powerpoint.Application", &e))
{
CString str;
str.Format("CreateDispatch() failed w/err 0x%08lx", e.m_sc),
AfxMessageBox(str, MB_SETFOREGROUND);
return;
}
app.SetVisible(TRUE); Presentations presSet(app.GetPresentations());
_Presentation pres(presSet.Add(TRUE));

Slides slideSet(pres.GetSlides());
_Slide slide1(slideSet.Add(1, 2));

// Add text to slide, by navigating the slide as follows:
// slide1.shapes(#).TextFrame.TextRange.Text
{
Shapes shapes(slide1.GetShapes());
Shape shape(shapes.Item(COleVariant((long)1)));
TextFrame textFrame(shape.GetTextFrame());
TextRange textRange(textFrame.GetTextRange());
textRange.SetText("My first slide");
}
{
Shapes shapes(slide1.GetShapes());
Shape shape(shapes.Item(COleVariant((long)2)));
TextFrame textFrame(shape.GetTextFrame());
TextRange textRange(textFrame.GetTextRange());
textRange.SetText("Automating PowerPoint is easy\r\n"
"Using Visual C++ is powerful!");
font = textrange.GetFont();
font.SetName("Comic Sans MS"); //Set the font name.
font.SetSize((float)48);
}
Now the question is how to change the font color????
Help me,please!!
Thanks a lot!!

cengyikun
GeneralHTML on CPropertySheet Pin
Jack_pt15-Nov-04 15:22
Jack_pt15-Nov-04 15:22 
GeneralC++ Help Pin
glowskull0315-Nov-04 14:14
glowskull0315-Nov-04 14:14 
GeneralRe: C++ Help Pin
DaFrawg15-Nov-04 20:58
DaFrawg15-Nov-04 20:58 
GeneralRe: C++ Help Pin
dharani16-Nov-04 23:42
dharani16-Nov-04 23:42 
GeneralRe: C++ Help Pin
DaFrawg18-Nov-04 3:33
DaFrawg18-Nov-04 3:33 
GeneralRe: C++ Help Pin
namaskaaram15-Nov-04 22:16
namaskaaram15-Nov-04 22:16 
GeneralRe: C++ Help Pin
Henry miller16-Nov-04 2:26
Henry miller16-Nov-04 2:26 
GeneralCommand line error D2022 Pin
bneacetp15-Nov-04 13:07
bneacetp15-Nov-04 13:07 
GeneralRIFF and LIST Chunks Pin
Anonymous15-Nov-04 12:45
Anonymous15-Nov-04 12:45 
GeneralShort Jumps in Inline Assembly Pin
Xzyx987X15-Nov-04 11:41
Xzyx987X15-Nov-04 11:41 
QuestionHow do I... Pin
KORCARI15-Nov-04 10:38
KORCARI15-Nov-04 10:38 
AnswerRe: How do I... Pin
David Crow15-Nov-04 10:55
David Crow15-Nov-04 10:55 
GeneralRe: How do I... Pin
Christian Graus15-Nov-04 13:36
protectorChristian Graus15-Nov-04 13:36 
GeneralRe: How do I... Pin
DaFrawg15-Nov-04 21:03
DaFrawg15-Nov-04 21:03 
GeneralRe: How do I... Pin
Christian Graus16-Nov-04 0:29
protectorChristian Graus16-Nov-04 0:29 
GeneralRe: How do I... Pin
DaFrawg18-Nov-04 3:55
DaFrawg18-Nov-04 3:55 
GeneralRe: How do I... Pin
Christian Graus18-Nov-04 10:15
protectorChristian Graus18-Nov-04 10:15 

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.