#include "FiveWin.ch"
Function Main()
Local oDlg,oGet1,oGet2,cVar1:=Space(30),cVar2:=space(30)
DEFINE DIALOG oDlg TITLE "Testing Copy Paste"
@01,01 GET oGet1 VAR cVar1 SIZE 100,12
@03,01 GET oGet2 VAR cVar2 SIZE 100,12
ACTIVATE DIALOG oDlg
Return nil
HB_FUNC( GETCLPDATA ) // GETCLIPBOARDDATA( nFormat ) --> uData
{
WORD wType = hb_parni( 1 );
HGLOBAL hMem;
// if( ( wType == CF_TEXT ) && ( EnumClipboardFormats( CF_TEXT ) != 0 ) )
// wType = CF_UNICODETEXT;
...
if( ( wType == CF_TEXT ) && ( EnumClipboardFormats( CF_TEXT ) == CF_UNICODETEXT ) )
wType = CF_UNICODETEXT;
#include "FiveWin.ch"
Function Main()
Local oDlg,oGet1,oGet2,cVar1:="Test clipboard", cVar2:=space(30)
DEFINE DIALOG oDlg TITLE "Testing Copy Paste"
@01,01 GET oGet1 VAR cVar1 SIZE 100,12
@03,01 GET oGet2 VAR cVar2 SIZE 100,12
ACTIVATE DIALOG oDlg
Return nil
case nMsg == WM_PASTE
if GetFocus() == ::hWnd
CallWindowProc( ::nOldProc, ::hWnd, WM_PASTE, 0, 0 )
::oGet:Buffer = GetWindowText( ::hWnd )
::oGet:Pos = GetCaretPos()[ 2 ]
::oGet:Assign()
if ::bChange != nil
Eval( ::bChange,,, Self )
endif
endif
return 0
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 36 guests