Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 03 AUG 2003 12:27:40PM Richard Hunt wrote:

I did not realize that the "SELECTION" property has a 64k limit.

I use an Editbox to display information. Definately could exceed 64k. I also have an option to "FIND" and "FIND NEXT" text within the Editbox. Was using the "SELECTION" property to highlight the found text. I just found out that it does not work beyond 64k.

This is kinda an annoyance.


At 04 AUG 2003 03:12AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:

Richard,

Anything special about the editbox properties? I don't seem to be able to reproduce this…

The Sprezzatura Group

World leaders in all things RevSoft


At 04 AUG 2003 10:52AM Richard Hunt wrote:

Sprezzatura,

Could you do me a favor and test this little proceedure… FOCUS being the editbox.

TEXT=STR('1',80000):'INDEX222'

RESULT=SET_PROPERTY(FOCUS,'TEXT',TEXT)

RESULT=SET_PROPERTY(FOCUS,'SELECTION',80001:@FM:5)

SELECTION=GET_PROPERTY(FOCUS,'SELECTION')

The "SET_PROPERTY" works fine. It actually does select the letters "INDEX", and only the letters index. Its the "GET_PROPERTY" that is failing for me. The "SELECTION" variable contains the following…

65536:@FM:0

The styles I have checked for the editbox are LEFT, VISIBLE, BORDER, HORZ SCROLL BAR, VERT SCROLL BAR.

I used the "LOSTFOCUS" of an editline to execute the proceedure. When the editbox got focus the selection showed up just fine. My problem is I can not get "SELECTION" position beyond 64k.


At 04 AUG 2003 11:40AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:

Aha! Now I see what you mean - the text does get selected, but the SELECTION property returned is screwed. OK, that looks pretty much like a bug to me :)

Here's a quick workaround though…

declare function getPointer, sendMessage
equ EM_GETSEL$ to 0x00B0

hwnd=get_Property( focus, "HANDLE" )
selStart=0
selEnd=0

retVal=sendMessage( hwnd, EM_GETSEL$, getPointer( selStart ), getPointer( selEnd ) )

* // Remember WinAPI stuff is 0-based ...
selStart += 1
selEnd += 1

The Sprezzatura Group

World leaders in all things RevSoft


At 04 AUG 2003 11:57AM Richard Hunt wrote:

DOH!!!

I tried the "SENDMESSAGE"… I forgot about the "SETPOINTER"!!!

And always THANKS!


At 04 AUG 2003 01:27PM Pat McNerthney wrote:

I happened to have realized this issue just last week, and had already fixed it for the next major version of OI.

Pat

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/4491c24b963e4ec085256d77005a6c7d.txt
  • Last modified: 2024/01/04 21:00
  • by 127.0.0.1