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…