代碼很簡單,如下:
void __fastcall Tppt_Form::FormShow(TObject *Sender)
{
//打開ppt檔案
OleContainer1->CreateObjectFromFile(WideString(Edit1->Text),false);
OleContainer1->DoVerb(ovOpen);
OleContainer1->SizeMode=smAutoSize;
OleContainer1->AllowInPlace=true;
OleContainer1->AllowActiveDoc=true;
}
ppt檔案是打開了,但不能編輯,點右鍵后,有“顯示、編輯、打開”,但點了都沒有反應。我想在form中直接打開ppt檔案,就像在WIN7中直接打開ppt檔案一樣。
OleContainer1->AllowInPlace=true;
OleContainer1->AllowActiveDoc=true;也設定了,但沒有用。
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/90233.html
標籤:基礎類
上一篇:關于MFC中簡單的查詢方法
下一篇:求問cpp
