2001-11-19 00:33:36 +00:00
|
|
|
#ifndef CMSWINDOWSCLIPBOARD_H
|
|
|
|
#define CMSWINDOWSCLIPBOARD_H
|
|
|
|
|
|
|
|
#include "IClipboard.h"
|
2002-06-10 16:49:46 +00:00
|
|
|
#define WIN32_LEAN_AND_MEAN
|
2001-11-25 18:32:41 +00:00
|
|
|
#include <windows.h>
|
2001-11-19 00:33:36 +00:00
|
|
|
|
|
|
|
class CMSWindowsClipboard : public IClipboard {
|
2002-04-29 14:40:01 +00:00
|
|
|
public:
|
2001-11-25 18:32:41 +00:00
|
|
|
CMSWindowsClipboard(HWND window);
|
2001-11-19 00:33:36 +00:00
|
|
|
virtual ~CMSWindowsClipboard();
|
|
|
|
|
|
|
|
// IClipboard overrides
|
2002-05-27 18:55:51 +00:00
|
|
|
virtual bool empty();
|
2001-11-19 00:33:36 +00:00
|
|
|
virtual void add(EFormat, const CString& data);
|
2002-05-27 18:55:51 +00:00
|
|
|
virtual bool open(Time) const;
|
|
|
|
virtual void close() const;
|
2002-04-30 16:23:03 +00:00
|
|
|
virtual Time getTime() const;
|
2001-11-19 00:33:36 +00:00
|
|
|
virtual bool has(EFormat) const;
|
|
|
|
virtual CString get(EFormat) const;
|
2001-11-25 18:32:41 +00:00
|
|
|
|
2002-04-29 14:40:01 +00:00
|
|
|
private:
|
2001-11-25 18:32:41 +00:00
|
|
|
UINT convertFormatToWin32(EFormat) const;
|
|
|
|
HANDLE convertTextToWin32(const CString& data) const;
|
|
|
|
CString convertTextFromWin32(HANDLE) const;
|
|
|
|
|
2002-04-29 14:40:01 +00:00
|
|
|
private:
|
2001-11-25 18:32:41 +00:00
|
|
|
HWND m_window;
|
2002-05-27 18:55:51 +00:00
|
|
|
mutable Time m_time;
|
2001-11-19 00:33:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|