アクティブ・プリンタ名の取得
【オブジェクト】
_Application
【プロパティ】
_bstr_t object->ActivePrinter
【戻り値】
アクティブ・プリンタ名
【サンプル】
void CImp_app_ActivePrinterDlg::OnButton1()
{
using namespace Excel;
_ApplicationPtr pXL;
//Excelの起動
pXL.CreateInstance(L"Excel.Application");
//アクティブ・プリンタ名を取得
_bstr_t buf = pXL->ActivePrinter;
AfxMessageBox("アクティブ・プリンタ = " + buf);
//Excelを終了
pXL->Quit();
}
[サンプル・ソース]