/*
* Clipboard.h
* Copyright (c) 2011 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED.
*/
// SOL++2000
#pragma once
#include <sol\Object.h>
#include <sol\View.h>
namespace SOL {
class Clipboard :public Object {
View* owner;
BOOL status;
public:
Clipboard(View* owner1) {
owner = owner1;
status = ::OpenClipboard(owner.getWindow());
}
BOOL close() {
return ::CloseClipboard();
}
int countFormats() {
return ::CountClipboardFormats();
}
BOOL empty() {
return ::EmptyClipboard();
}
HANDLE getData(UINT format) {
return ::GetClipboardData(format);
}
int getFormatName(UINT format, String buff, int max) {
return ::GetClipboardFormatName(format, buff, max);
}
View* getOwner() {
return owner;
}
void set(UINT format, HANDLE hdata) {
::SetClipboardData(format, hdata);
}
};
}
|