Introduction to clipboard API functions

Source: Internet
Author: User

(1)
Changeconboardchain


Transfers the clipboard connection from a handle to the next handle.
Bool
Changeconboardchain (
Hwnd hwndremove, // handle to window to remove

Hwnd hwndnewnext // handle to next window
);
(1) hwndremove table
The handle of the first window ).
(2) hwndnewnext indicates the handle (connection) of the second window ).
Note that you should use
Setclipboardviewer connects the window handle in advance.
(2)Closeclipboard


Close the clipboard.
Bool
Closeclipboard (void) // void indicates that it is blank.
This function has no parameters. You should use the openclipboard function to open the clipboard beforehand.
Board.
(3)Countclipboardformats


No matter what the clipboard format is, all are converted to the data format.
Int
Countclipboardformats (void)
This function has no parameters.
(4)Emptyclipboard


Clear clipboard
Board.
Bool emptyclipboard (void)
This function has no parameters.
(5)Enumclipboardformats



Converts the format in the clipboard to the specified format.
Uint enumclipboardformats (
Uint format //
Specifies a known available clipboard format
);
The format indicates the conversion.
Format. The meaning of this parameter can be referred to later.
(6)Getclipboarddata


Obtain the data in the clipboard.
Handle
Getclipboarddata (
Uint uformat // clipboard format
);
Where
Format indicates the data format in the clipboard. The meaning of this parameter can be referred to later.
(7)Getclipboardformatname


Get clipboard
Name of the data format in.
Int getclipboardformatname (
Uint format, // clipboard
Format to retrieve
Lptstr lpszformatname, // address of buffer
Name
Int cchmaxcount // length of name string in characters
);
(1) Format
The representation must be in a format not specified in advance;
(2) lpszformatname indicates the format name address;
(3) cchmaxcount cut
The length of the data in the clipboard.
(8)Getclipboardowner


Obtains the handle of the window to which the current clipboard belongs.
Hwnd
Getclipboardowner (void)
Return the handle of the window.
(9)Getclipboardsequencenumber



Returns the clipboard number.
DWORD getclipboardsequencenumber (void)
(10)Getclipboardviewer



Returns the handle of the window to which the clipboard belongs.
Hwnd getclipboardviewer (void)
(10)
1)Getopenclipboardwindow


Returns the window handle that opens the clipboard.
Hwnd
Getopenclipboardwindow (void)
(12)Getpriorityclipboardformat


Int
Getpriorityclipboardformat (
Uint * paformatprioritylist, // address
Of priority list
Int cformats // number of entries in list
);
(13)Isclipboardformatavailable


Determine the clipboard format.
Bool
Isclipboardformatavailable (
Uint format // clipboard format
);
The format indicates the data format in the clipboard. The meaning of this parameter can be referred to later.
(14)Openclipboard


Open the clipboard.
Bool
Openclipboard (
Hwnd hwndnewowner // handle to window opening
Clipboard
);
Returns the clipboard handle.
(15th)Registerclipboardformat


Register the new clipboard format.
Uint registerclipboardformat (
Lpctstr lpszformat //
Address of name string
);
The name of the new clipboard format in lpszformat.
(16)Setclipboarddata


Set the data in the clipboard.
Handle setclipboarddata (
Uint
Uformat, // clipboard format
Handle hmem // data handle
);
Uformat
Indicates the format of the data to be placed in the clipboard;
Hmem indicates the data address pointer.
(17)Setclipboardviewer


Move the clipboard
Connect to the window.
Hwnd setclipboardviewer (
Hwnd hwndnewviewer // handle
Clipboard Viewer window
);
Hwndnewviewer indicates the window handle to connect.
Cut Above
The following are optional parameters for the clipboard format:
Cf_bitmap bitmap format;
Cf_dib
Cf_dibv5
Cf_dif

Cf_dspbitmap
Cf_dspenhmetafile
Cf_dspmetafilepict
Cf_dsptext

Cf_enhmetafile
Cf_gdiobjfirst
Cf_gdiobjlast
Cf_hdrop
Cf_locale

Cf_metafilepict
Cf_oemtext
Cf_ownerdisplay
Cf_palette
Cf_pendata

Cf_privatefirst
Cf_privatelast
Cf_riff
Cf_sylk
Cf_text
Text format;
Cf_wave music format;
Cf_tiff
Cf_unicodetext

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.