クリップボード内のデータのデータ形式の数を取得
【書式】
int CountClipboardFormats(VOID)
【戻り値】
正常:クリップボードに存在するデータのデータ形式の数
失敗:0 (拡張エラー情報取得は、GetLastErrorを使用)
インクルード :Windows.h
インポートライブラリ:User32.lib
【サンプル】
#include "Windows.h"
//クリップボード内のデータ形式の数を取得
void CCntClipFrmDlg::OnButton1()
{
int intCnt;
char cTmp[99];
intCnt = CountClipboardFormats();
if(intCnt == 0){
AfxMessageBox("Error");
return;
}
itoa(intCnt, cTmp, 10);
AfxMessageBox(cTmp);
}
[サンプル・ソース]
(注意)
このサンプルは、Visual C++ 6.0で作成されています。