Clipboard Viewer

Clipboard Viewer

The following tool shows a simple Clipboard viewer application. There are several examples of Clipboard usage in MSDN documents. With them, I have made this tool as a spy to understand and debug Clipboard exchanges. It uses a particular feature of linking an application with the Windows Clipboard to allow you to make a viewer.

This tool displays the Clipboard data format available and allows you to choose to display corresponding data in real time (at the time it was taken in Clipboard). It's possible to display it in hexa format or, if for several formats, in a true format (for example: image for dib or bitmap, text for simple text format). This program is also an example of Clipboard usage with Windows MFC.

Clipboard Viewer Windows (Microsoft Aide)

A Clipboard viewer window displays the current content of the Clipboard and receives messages when the Clipboard content changes. To create a Clipboard viewer window, your application must do the following:

  • Add the window to the clipboard viewer chain.
  • Process the WM_CHANGECBCHAIN message.
  • Process the WM_DRAWCLIPBOARD message.
  • Remove the window from the Clipboard viewer chain before it is destroyed.

A window adds itself to the Clipboard viewer chain by calling the SetClipboardViewer function. The return value is the handle to the next window in the chain. To retrieve the handle to the first window in the chain, call the GetClipboardViewer function. Each Clipboard viewer window must keep track of the next window in the Clipboard viewer chain. When the contents of the Clipboard changes, the system sends a WM_DRAWCLIPBOARD message to the first window in the chain.

After updating its display, each Clipboard viewer window must pass this message on to the next window in the chain. Before closing, a Clipboard viewer window must remove itself from the Clipboard viewer chain by calling the ChangeClipboardChain function. The system then sends a WM_CHANGECBCHAIN message to the first window in the chain.

About the Author

Georges Dumond

Courbevoie (France)



  • Fake Oakley Radarlock wholesale store

    Posted by vnyntwbav on 06/30/2013 01:15am

    FakE OaklEyS ,Oakley sunglasses lens sunglasses sale silver announcement is usually a milestone within the glasses. This new brand of sunglasses provides you with an unprecedented enjoyment and fitness. Wear OAKLEY sunscreen inside the appropriate forum, our primary speak about why you wish to opt for a different tag Oakley sunglasses. fake ray ban sunglasses ,Oakley Eyewear lenses in bright light top in sunny conditions, all of the lens use a truer color perception. The initial design and precision manufacturing touch, from your brand, to ensure that each set of sunglasses masterpiece. They may come together in one style, design and elegance. OAKley EyepAtch 2 SunglASSeS ,Generally from the lens design of Oakley sunglasses sale, in addition to a greater a number of colors inside the fashion choice, more high-level, there are a variety of female friends want to wear accustomed to match the form of Oakley sunglasses. Oakley sunglasses find suitable for all age groups, colors, shapes and fashion, regardless of style of a set of sunglasses, is personally made for you. Varieties of Oakley sunglasses, annual changes, like all other fashion. However, the alternatives are incredibly different, hasn't been matched towards the design. Oakley is popular around the globe product selection for instance shoes, watches, backpacks and sweatshirts, however are very famous because of its attractive color, men and women cheap Oakley sunglasses are well known. Additional Oakley sun screen lotion to utilize for medical use. Solutions on the UV radiation over the skin of psoriasis patients PUVA remedy with a period of time is comfortable with the ultraviolet light. Artists and professional sunglasses, equally expensive for that form of movement, more than the price of the vast majority of sunglasses. However, you'll find a variety of discount Oakley sunglasses available on the web. Each wearing Oakley sunglasses sweat of athletes inside the arena, are worth respect. Oakley sunglasses are very practical, Oakley, the sunglasses will allow you to extinguish sun burn, and to present you with 100% UV blockage. Expensive to get a good income of excellent quality and Oakley sunglasses women quite a while to joy, as well as get Oakley sunglasses single for each scene. Oakley sunglasses undoubtedly swept all of those other women's accessories of choice for data, they're all season, all through the season sell.

  • Clipboard Viewer

    Posted by suzannguyen on 04/18/2005 10:21pm

    A Window adds itself to the clipboard viewer chain by calling the SetClipboardViewer function. I don't know what the return value is.

    • Clipboard Viewer + Dailog

      Posted by Msm on 09/01/2008 04:14am

      Hello Sir I read your artical it is very usefull for me.But i want to do in the dailog application.Sir i want to show it's out put on dailog application.Sir how can i change this sir plz help me

    • Return value of the SetClipboardViewer function

      Posted by Cassonnet on 04/19/2005 01:45am

      If the function succeeds, the return value identifies the next window in the clipboard viewer chain. If an error occurs or there are no other windows in the clipboard viewer chain, the return value is NULL. To get extended error information, call GetLastError.

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • As all sorts of data becomes available for storage, analysis and retrieval - so called 'Big Data' - there are potentially huge benefits, but equally huge challenges...
  • The agile organization needs knowledge to act on, quickly and effectively. Though many organizations are clamouring for "Big Data", not nearly as many know what to do with it...
  • Cloud-based integration solutions can be confusing. Adding to the confusion are the multiple ways IT departments can deliver such integration...

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date