Author | Topic: MemoEdit | |
---|---|---|
Hans =?ISO-8859-1?B?Qvh0a2Vy?= | MemoEdit on Tue, 25 Sep 2007 09:11:35 +0200 Hello. Than you for all your anwsers. But I just can't get it to work. I have tried the little test prgram delivered by Alaska: CrtBox.prg. When I try to mark the text with the left button, a block will be marked, but as soon as I release the button the block disappear. The right button does not work at all. What do I have to do, to get this litte application to work with copy/paste to/from ? My first mail: -- We have started to migrate an application from Clipper 5.2 to Xbase++ In the old applaication we were using a ClipBoard utillity from Funcky, where it was possible to block mark, copy/paste to/from an ordinary memoedit field. Is it posible to do something simular in Xbase++ ? It has to be from a memoedit field. Thanks.... -- Mvh. Hans Btker | |
AUGE_OHR | Re: MemoEdit on Tue, 25 Sep 2007 16:43:18 +0200 hi, > Than you for all your anwsers. But I just can't get it to work. I have > tried > the little test prgram > delivered by Alaska: CrtBox.prg. > When I try to mark the text with the left button, a block will be marked, > but as soon as I release the button the block disappear. this is the way Xbase++ mark. if you release left Button your Clipboard shoud be filled without STRG-C. greetings by OHR Jimmy | |
Hans =?ISO-8859-1?B?Qvh0a2Vy?= | Svar: Re: MemoEdit on Wed, 26 Sep 2007 10:55:31 +0200 Hi Jimmy. Ok I see. But is it possiible to use the keyboard instead of the mouse ? How do you paste the Clipboard to the memoedit ? Mvh. Hans Btker >>> AUGE_OHR<AUGE_OHR*AT*CSI.COM> 25-09-2007 16:43 >>> hi, > Than you for all your anwsers. But I just can't get it to work. I have > tried > the little test prgram > delivered by Alaska: CrtBox.prg. > When I try to mark the text with the left button, a block will be marked, > but as soon as I release the button the block disappear. this is the way Xbase++ mark. if you release left Button your Clipboard shoud be filled without STRG-C. greetings by OHR Jimmy | |
Thomas Braun | Re: Svar: Re: MemoEdit on Wed, 26 Sep 2007 14:48:41 +0200 Hans Bøtker wrote: > Ok I see. > But is it possiible to use the keyboard instead of the mouse ? No - this function has nothing to do with memoedit in special. It simply is a function to copy any character based screen content to the clipboard. > How do you paste the Clipboard to the memoedit ? I don't think that you will get this working like you need it. I'm don't know how Funcky Library did "the magic", but most likely they used some undocumented internals of Clipper. Since Alaska only ported the officially "known" Clipper features to Xbase++, it might be a problem to implement "marking" and cut'n'paste in memoedit. How about writing a memoedit replacement of your own in pure Xbase++ code? regards Thomas | |
Pascal Boivin | Re: Svar: Re: MemoEdit on Wed, 26 Sep 2007 14:40:03 -0400 I beleive the "magic" was done using DOS interrupt 2F which was redirected when running Windows. I suggest to avoid this in todays app! Interrupt Summary Version 1.6, by Daniel D. Miller, Copyright (c) 1995 ------------------------------------------------------------------------ INT AH AL Description Press F1 for help ------------------------------------------------------------------------ 2F 17 01 W> MS Windows "WINOLDAP" - OPEN CLIPBOARD 2F 17 02 W> MS Windows "WINOLDAP" - EMPTY CLIPBOARD 2F 17 03 W> MS Windows "WINOLDAP" - SET CLIPBOARD DATA 2F 17 04 W> MS Windows "WINOLDAP" - GET CLIPBOARD DATA SIZE 2F 17 05 W> MS Windows "WINOLDAP" - GET CLIPBOARD DATA 2F 17 08 W> MS Windows "WINOLDAP" - CloseClipboard 2F 17 09 W> MS Windows "WINOLDAP" - COMPACT CLIPBOARD ************************ * Pascal Boivin * * N.B. Automation inc. * ************************ | |
Brian L. Wolfsohn | Re: Svar: Re: MemoEdit on Wed, 26 Sep 2007 20:05:49 +0200 "Hans Btker" <hb@ascott.dk> wrote in news:19ff2d7f$11ac9550$18bdd3@news.alaska-software.com: > Hi Jimmy. > > Ok I see. > But is it possiible to use the keyboard instead of the mouse ? How do > you paste the Clipboard to the memoedit ? > right click will do it.. you must have quick edit mode enabled in the dos box properties. Brian | |
AUGE_OHR | Re: Re: MemoEdit on Thu, 27 Sep 2007 07:15:26 +0200 hi, > Ok I see. > But is it possiible to use the keyboard instead of the mouse ? How do you > paste the Clipboard to the memoedit ? hm ... yes ... if you create a UDF for you Memoedit like this *** snip *** FUNCTION MemoUDF(modus, nRow, nCol ) LOCAL oben, ospalte, unten, uspalte STATIC aFrom := {0,0} STATIC aEnde := {0,0} ... @ unten+1,ospalte SAY nRow PICTURE "9999"+"/" @ unten+1,ospalte+5 SAY nCol+1 PICTURE "9999" @ unten+1,uspalte-9 SAY IF (READINSERT(),"Einfgen ","sberschr. ") DO CASE CASE modus = 3 IF READINSERT() @ unten+1,uspalte-9 SAY IF (READINSERT(),"Einfgen ","sberschr. ") ENDIF CASE modus = 1 .OR. modus = 2 DO CASE CASE LASTKEY() = 279 .OR. LASTKEY() = 22 m_ins = READINSERT() @ unten+1,uspalte-9 SAY IF (m_ins,"sberschr. ","Einfgen ") CASE LASTKEY() = K_F10 .OR. LASTKEY() = K_ESC abbruch = .T. RETURN (27) CASE LASTKEY() = K_F2 SETCOLOR (ys_invers) SET CURSOR ON aFrom[1] := nRow aFrom[2] := nCol SetMarker("IN", {nRow, nCol} ) CASE LASTKEY() = K_F3 SETCOLOR (ys_normal) SET CURSOR OFF aEnde[1] := nRow aEnde[2] := nCol SetMarker("OUT", ,{nRow, nCol}) CASE LASTKEY() = K_F4 SetMarker("COPY",aFrom,aEnde) OTHERWISE RETURN(1) ENDCASE ENDCASE RETURN (0) FUNCTION SetMarker(cAction, aStart, aStop) reread Memo cMemo := MEMOREAD(myDBF->myMemo) must be same Size (80) as before iMax := MlCount( cMemo, 80 ) FOR i :=1 to iMax IF i = zeile cPart := MemoLine( cMemo, 80, i ) DO CASE CASE cInOut = "IN" CASE cInOut = "OUT" CASE cInOut = "COPY" ENDCASE ENDIF NEXT RETURN NIL *** eof *** but why not use XbpMLE in Hybrid mode ? it is much easy than to write Function SetMarker() ... use Formdesigner XppFD.EXE, open your DBF and use your Memofield. Dragdrop your Memofield into Form, place some Button on it and let XppFD generate your PRG File. try to use ClassCode, generated by XppFD, but you can use Function too. In Hybrid Mode ( "DOSlike" + GUI Parts ) you have to use setAppWindow() to switch between oCRT and oDLG Windows. Use setAppFocus() to activate XbpMLE. greetings by OHR Jimmy |