function PlaceSomeText()
local cText := Space( 30 )
//if MsgGet( "Ok...", "Write something!", @cText )
// oClp:SetText( cText )
//endif
oClp:SetText( Replicate( "ABCDEFGHIJ" + Chr( 13 ) + Chr( 10 ), 100000 ) )
nMsgBox( "Number of bytes in clipboard: " + Str( Len( oClp:GetText() ) ) )
return nil
The particular feature I am implementing copies delimited email addresses to the Clipboard so that they may be pasted in the TO: or BCC: block of an email message using whatever email software our customer prefers to use. There may be a better way of allowing our customers to do a mass email to a select group of their constituents, so I'm open to suggestions.
...
ULONG ulLen; // instead of WORD
...
case CF_TEXT:
ulLen = _parclen( 2 );
hMem = GlobalAlloc( GHND, ulLen + 1 );
if( ! hMem )
{
_retl( 0 );
return;
}
pMem = GlobalLock( hMem );
_bcopy( ( char * ) pMem, _parc( 2 ), ulLen );
GlobalUnlock( hMem );
_retl( ( BOOL ) SetClipboardData( CF_TEXT, hMem ) );
break;
...
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 73 guests