wfc_get_string_from_clipboard

$Revision: 4 $

Declaration

bool wfc_get_string_from_clipboard( CString& string_to_return )

Description

This function retrieves a string from the clipboard.

Example

#if ! defined( WINVER )
#define WINVER 0x401
#endif // WINVER

#define WFC_STL

#include <wfc.h>
#include <imagehlp.h>
#pragma hdrstop

#pragma comment( lib, "imagehlp.lib" )

int _tmain( void )
{
   WFCTRACEINIT( TEXT( "_tmain()" ) );

   TCHAR undecorated_name[ 1025 ];

   ZeroMemory( undecorated_name, sizeof( undecorated_name ) );

   CString clipboard_string;

   if ( wfc_get_string_from_clipboard( clipboard_string ) == true )
   {
      if ( UnDecorateSymbolName( clipboard_string,
                                 undecorated_name,
                                 sizeof( undecorated_name ),
                                 UNDNAME_COMPLETE ) > 0 )
      {
         _tprintf( TEXT( "%s\n" ), undecorated_name );
      }
      else
      {
         _tprintf( TEXT( "%s doesn't demangle\n" ), (LPCTSTR) clipboard_string );
      }
   }

   return( EXIT_SUCCESS );
}

API's Used

wfc_get_string_from_clipboard() uses the following API's:
Copyright, 2000, Samuel R. Blackburn
$Workfile: wfc_get_string_from_clipboard.cpp $
$Modtime: 6/26/01 10:58a $