|
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
|
|
|
|
|
hi all,
I want to add multiple rows using Edit Control.
I did like this:
CEdit m_edit;
m_edit.SetWindowText("hellow \n code \n project\n");
But this is not working .
when I compile and run the application.it is displayed like this:
hellow|code|project|
But I want to show the output like this using Edit Control:-
hellow
code
project
So can any body help me to solve this..
Thanks in advance
|
|
|
|
|
Did you choose multiline for the options of the edit control ?
Right click on the edit ctrl -> properties -> 'Styles' Tab -> check 'Multiline'.
|
|
|
|
|
hi
yes..I already check the multiline
Is there a another way to set string instead of SetWindowText()
??
|
|
|
|
|
pubududilena wrote:
CEdit m_edit;
m_edit.SetWindowText("hellow \n code \n project\n");
Try this instead:
CEdit m_edit;<br />
m_edit.SetWindowText("hellow \r\n code \r\n project\r\n");<br />
|
|
|
|
|
yes ..Thank u for correct me..
That is working now..
|
|
|
|
|
I build an ATL control, but after fresh many time, it will crash.
I find that column "Gdi objects" in "Task Manager" will be 9999.
I doubt that there are some problem in below code:
Line1 HRGN rgn = CreateRectRgn(...);
Line2 SelectClipRgn(hdc, rgn);
Line3 Draw Something;
Line4 SelectClipRgn(hdc, NULL);
Line5 DeleteObject(rgn);
I find that column "Gdi objects" will increment randomly after execute Line1; but when execute Line5, the column value be always unchanged(I assume it will decrement).
Is there any relationship between "Gdi objects" and windows gdi objects?
and why?
|
|
|
|
|
I am not able to use various commands,macros, project settings and all other stuff of Visual Studio. Like yesterday i come to know TRACE is very usefule but yet not able to use it. Similiary many hidden. Do help me for proper use of Visual Studio tools.I work with VC++ using MFC and win32 API.
Thanks for kind help
Moyeen
Sr. Software Design Engineer
|
|
|
|
|
Moyeen_VC++ wrote:
...but yet not able to use it.
Why?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi friends,
Windows handles are always unique for the specific OS instance.Anybody is having idea from where this uniqueness coming from?
|
|
|
|
|
|
Well,
That Explains a lot
|
|
|
|
|
A window handle isn't really anything, but it could be an integer. If you increment the integer by some arbitrary value every time CreateWindow succeeds, you get reasonably unique values...
Steve S
Developer for hire
|
|
|
|
|
I have started programming one year ago; using vc, but now i have come to know that in VB one can also call APIs; which mean we can do all low level tasks.
Then why VC is considered more powerfull?
Is it a reality or just a result of good marketing?
|
|
|
|
|
Yeah VC is considered More Powerful as it give rawower to every thing.
windows Handle ,Dll etc.
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
its sometimes not wot you do but how you do
There is no spoon.
mail
|
|
|
|
|
Didn't I just see this same post in 'The Lounge'?
If I write code in my sleep, does that make me brilliant, or just a lazy programmer?
My articles
www.stillwaterexpress.com
BlackDice - the programmer formerly known as bdiamond
|
|
|
|
|
sorry for that; I should have deleted it from their.
|
|
|
|
|
I am using installshield; version which comes with visual studio 6;
How can I register/unregister AX controls and dlls using it;
I donot want to use any other installer/un installer; just above mentioned version of installshield.
plz help.
|
|
|
|
|
using this
to register
ShellExecute(NULL,"open","regsvr32.exe"," yourCom.dll",NULL,SW_SHOWNORMAL);
to register silently
ShellExecute(NULL,"open","regsvr32.exe"," \s yourCom.dll",NULL,SW_SHOWNORMAL);
to unregeister
ShellExecute(NULL,"open","regsvr32.exe","\u yourCom.dll",NULL,SW_SHOWNORMAL);
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
hai Frens. . .
Can any one guide me how to enable a multiple row selection in MSFlexGrid in VC++.
I should allow user to select multiple rows when the Ctrl key is pressed.
Thanx
|
|
|
|
|
Let ToolBarCtrl's buttons have diffrent size icons in ONE bitmap source.
Help me please!
|
|
|
|
|
Let ToolBarCtrl's buttons have diffrent size icons in ONE bitmap resource.
Help me please!
|
|
|
|
|
this is what I used in my CMainFrame class's OnCreate() handler function. My bitmap has 9 32 x 32 bitmaps in one image.
<code>
HBITMAP hbm = (HBITMAP)::LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_BITMAP1), IMAGE_BITMAP, 0,0,
LR_CREATEDIBSECTION | LR_LOADMAP3DCOLORS );
CBitmap bm;
bm.Attach(hbm);
int ret = m_ilToolBar.Create(32,32,ILC_COLOR8 | ILC_MASK,1,0);
ret = m_ilToolBar.Add(&bm,RGB(0,0,0));
m_wndToolBar.GetToolBarCtrl().SetImageList(&m_ilToolBar);
SIZE szButton,szImage;
szButton.cx = 39;
szButton.cy = 38;
szImage.cx = 32;
szImage.cy = 32;
m_wndToolBar.SetSizes(szButton,szImage);
m_wndToolBar.GetToolBarCtrl().AutoSize();</code>
If I write code in my sleep, does that make me brilliant, or just a lazy programmer?
My articles
www.stillwaterexpress.com
BlackDice - the programmer formerly known as bdiamond
|
|
|
|
|
Sorry,but I can't exactly understand the codes.
Have you seen the "Google Toolbar" in IE?The icon in the first button("Google" button) is rectangle and much longer than the others.I want to implement a toolbar just like that.I mean that my first icon may be "100x20" pixels,and my second icon may be "20x20" pixels,and so on...
|
|
|
|