SOL9 2.0 Class: Clipboard

 SOL9 C++ Class Library  SOL9 Samples  SOL9 Tutorial  SOL9 FAQ  SOL9 ClassTree 

Source code

/*
 * 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);
    }
};

}



Last modified: 1 Feb 2012

Copyright (c) 2009-2012 Antillia.com ALL RIGHTS RESERVED.