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

C / C++ / MFC

 
GeneralRe: Help! need some tutorials on dialogs in an NONE dialog based application Pin
Michael P Butler15-Nov-04 0:18
Michael P Butler15-Nov-04 0:18 
GeneralA C++ programming question Pin
ting66814-Nov-04 22:56
ting66814-Nov-04 22:56 
GeneralRe: A C++ programming question Pin
Andrew Walker14-Nov-04 23:10
Andrew Walker14-Nov-04 23:10 
GeneralRe: A C++ programming question Pin
shiraztk14-Nov-04 23:12
shiraztk14-Nov-04 23:12 
Generalcorrect me if i'm wrong Pin
Budric B.15-Nov-04 5:33
Budric B.15-Nov-04 5:33 
GeneralChanging printer settings from the program Pin
Archigal14-Nov-04 22:28
Archigal14-Nov-04 22:28 
GeneralPlease, help me! Pin
Archigal15-Nov-04 2:18
Archigal15-Nov-04 2:18 
QuestionHow to change font color of slide? Pin
cengyikun14-Nov-04 22:15
susscengyikun14-Nov-04 22:15 
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!!;P

cengyikun
GeneralDirectSound Programming with C++ Pin
Sobero14-Nov-04 21:58
Sobero14-Nov-04 21:58 
GeneralRe: DirectSound Programming with C++ Pin
Antony M Kancidrowski15-Nov-04 0:08
Antony M Kancidrowski15-Nov-04 0:08 
GeneralRe: DirectSound Programming with C++ Pin
Sobero15-Nov-04 2:44
Sobero15-Nov-04 2:44 
GeneralRe: DirectSound Programming with C++ Pin
Cedric Moonen15-Nov-04 2:54
Cedric Moonen15-Nov-04 2:54 
GeneralRe: DirectSound Programming with C++ Pin
Sobero15-Nov-04 4:06
Sobero15-Nov-04 4:06 
GeneralRe: DirectSound Programming with C++ Pin
Cedric Moonen15-Nov-04 4:21
Cedric Moonen15-Nov-04 4:21 
GeneralRe: DirectSound Programming with C++ Pin
Sobero15-Nov-04 4:47
Sobero15-Nov-04 4:47 
GeneralRe: DirectSound Programming with C++ Pin
Cedric Moonen15-Nov-04 5:06
Cedric Moonen15-Nov-04 5:06 
GeneralRe: DirectSound Programming with C++ Pin
Sobero15-Nov-04 5:35
Sobero15-Nov-04 5:35 
GeneralRe: DirectSound Programming with C++ Pin
Antony M Kancidrowski15-Nov-04 5:43
Antony M Kancidrowski15-Nov-04 5:43 
GeneralRe: DirectSound Programming with C++ Pin
Sobero15-Nov-04 5:57
Sobero15-Nov-04 5:57 
GeneralRe: DirectSound Programming with C++ Pin
Cedric Moonen15-Nov-04 5:58
Cedric Moonen15-Nov-04 5:58 
GeneralRe: DirectSound Programming with C++ Pin
Sobero15-Nov-04 7:16
Sobero15-Nov-04 7:16 
GeneralRe: DirectSound Programming with C++ Pin
ThatsAlok15-Nov-04 17:34
ThatsAlok15-Nov-04 17:34 
GeneralRe: DirectSound Programming with C++ Pin
Cedric Moonen15-Nov-04 20:53
Cedric Moonen15-Nov-04 20:53 
GeneralCRXML 4.2 Driver is not registering. Pin
ArunAcharya14-Nov-04 21:33
ArunAcharya14-Nov-04 21:33 
GeneralRe: CRXML 4.2 Driver is not registering. Pin
Antony M Kancidrowski15-Nov-04 0:13
Antony M Kancidrowski15-Nov-04 0:13 

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.