Copy & Paste

Copy & Paste

Postby TimStone » Thu Sep 06, 2012 9: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Copy & Paste

Postby StefanHaupt » Fri Sep 07, 2012 7: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
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: Copy & Paste

Postby TimStone » Fri Sep 07, 2012 6: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Copy & Paste

Postby Antonio Linares » Fri Sep 07, 2012 7:22 pm

Tim,

This example is working fine here using Harbour and bcc582:

Code: Select all  Expand view  RUN
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Copy & Paste

Postby TimStone » Fri Sep 07, 2012 7: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Copy & Paste

Postby Enrico Maria Giordano » Fri Sep 07, 2012 7:51 pm

Try adding

Code: Select all  Expand view  RUN
ES_AUTOHSCROLL


to your GET.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Copy & Paste

Postby TimStone » Fri Sep 07, 2012 8: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Copy & Paste

Postby Gale FORd » Fri Sep 07, 2012 8:56 pm

I modified tget.prg to fix the problem rather than change all of the controls on all of the dialogs.
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Re: Copy & Paste

Postby Antonio Linares » Sat Sep 08, 2012 9:44 am

Tim,

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

Code: Select all  Expand view  RUN
  ...
   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
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Copy & Paste

Postby TimStone » Sat Sep 08, 2012 7: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 43 guests