Here is how we do it… [sourcecode language=’cpp’]UINT uFormat = EnumClipboardFormats( 0 ); while( uFormat ) { // Do something with this format … // Get next format uFormat = EnumClipboardFormats( uFormat ); }// End while[/sourcecode]
Continue reading…
Posts tagged with 'Clipboard'
Count of clipboard formats!
Use CountClipboardFormats.
Continue reading…
Function for copying text to clipboard!
A helper function for copying any given text to clipboard… [sourcecode language=’cpp’]static bool CopyTextToClipboard( HWND hWindow_i, LPCTSTR lpctszText_i ) { // Open clipboard if( !lpctszText_i || !::OpenClipboard( hWindow_i )) { return false; } // Clear clipboard EmptyClipboard(); const int nTotalAllocLen = ( _tcslen( lpctszText_i ) + 1 ) * sizeof( […]
Continue reading…