FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Copy & Paste
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM

Copy & Paste

Posted: Thu Sep 06, 2012 09:04 PM

I have had a problem surface in the past two months. I'm wondering if others have experienced this.

If I highlight a string of several words, and select copy, then paste it into a Memo field, the entire string will be entered. Thus, we know Copy is working correctly.

If I try to paste into a GET field, only part of the data will be pasted. Usually this is about the first 10 characters.

This used to work just fine, but started this behavior in recent versions.

Any ideas ?

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM

Re: Copy & Paste

Posted: Fri Sep 07, 2012 07:27 AM
Tim,

a similar problem was described here

http://forums.fivetechsupport.com/viewtopic.php?f=3&t=22627&start=15

If you paste in a get, the get variable must be at least of the same length as the pasted string, otherwise characters are dropped.
kind regards

Stefan
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM

Re: Copy & Paste

Posted: Fri Sep 07, 2012 06:58 PM

I read that thread. I do have Send32.lib linked in with my xHarbour version, but the problem exists in my MSVC version also.

Here are specifics:

I take the phrase: SILICONE SEALANT and copy it to the clipboard ( FWH ).

I then try to paste it into a GET field that is 30 spaces long. It only pastes SILICONE
I now go to a memo field, and it pastes the full string.
The problem exists in both the xHb ( .com ) builds ( Pelles C ), and in the MSVC versions.

It may have something to do with the size of the field. This string is 16 characters long plus two spaces. In the 30 character field, it only posts 8 characters. In a much larger field it may paste more characters. It seems like the paste is a percentage of the field length not the full available space.

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Copy & Paste

Posted: Fri Sep 07, 2012 07:22 PM
Tim,

This example is working fine here using Harbour and bcc582:

Code (fw): Select all Collapse
#include "FiveWin.ch"

function Main()

   local oDlg, cText := Space( 30 )

   DEFINE DIALOG oDlg

   @ 2, 2 GET cText OF oDlg

   ACTIVATE DIALOG oDlg CENTERED

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM

Re: Copy & Paste

Posted: Fri Sep 07, 2012 07:49 PM

Antonio,

I'm using Dialogs built with an .rc, and xHB(.com) or MSVC. There is no difference.

Also, this is a change from older behavior. It used to work perfectly. I know because my clients were cutting and pasting every day in their businesses.

Here is an example:

 REDEFINE GET oAcr:cliad2 ID 551 OF oDlar   UPDATE   // cliad2 is a 25 character field

  CONTROL "", 551, "Edit", WS_BORDER|WS_TABSTOP, 52, 70, 104, 13  // From the RC

The text string "Five Tech Software" is 18 characters long, less than the 25 character field
The program pastes only : "Five Tec"

This is occurring on the Harbour / MSVC version ( for testing ), just like it does on the xHb version.

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Copy & Paste

Posted: Fri Sep 07, 2012 07:51 PM
Try adding

Code (fw): Select all Collapse
ES_AUTOHSCROLL


to your GET.

EMG
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM

Re: Copy & Paste

Posted: Fri Sep 07, 2012 08:52 PM

That seems to resolve it. That's a lot of GET's to replace ....

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM

Re: Copy & Paste

Posted: Fri Sep 07, 2012 08:56 PM

I modified tget.prg to fix the problem rather than change all of the controls on all of the dialogs.

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Copy & Paste

Posted: Sat Sep 08, 2012 09:44 AM
Tim,

In source\classes\tget.prg Method Initiate() please add these lines:

Code (fw): Select all Collapse
   ...
   if ::lPassword
      SetWindowLong( ::hWnd, GWL_STYLE,;
                     nOr( GetWindowLong( ::hWnd, GWL_STYLE ), ES_PASSWORD ) )
   endif

   SetWindowLong( ::hWnd, GWL_STYLE,;  // new
                  nOr( GetWindowLong( ::hWnd, GWL_STYLE ), ES_AUTOHSCROLL ) )  // new
   ...
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM

Re: Copy & Paste

Posted: Sat Sep 08, 2012 07:34 PM

Thank you.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit

Continue the discussion