Hello ,
I need a very fast way to copy the whole text in an editorgadget in a stringvariable.
Do anyone knows, how to do it ?
Streaming in a stringvariable
- Hroudtwolf
- Addict

- Posts: 803
- Joined: Sat Feb 12, 2005 3:35 am
- Location: Germany(Hessen)
- Contact:
Re: Streaming in a stringvariable
Is a$=GetGadgetText(#editorgadget) too slow?
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
- Hroudtwolf
- Addict

- Posts: 803
- Joined: Sat Feb 12, 2005 3:35 am
- Location: Germany(Hessen)
- Contact:
Hi,
Increment Size of a String:
It's copied from any thread, I don't remember, but it work.
JOAQUIN
Increment Size of a String:
Code: Select all
Procedure SetStringManipulationBufferSize(Bytes)
PBStringBase.l = 0
PBMemoryBase.l = 0
!MOV eax, dword [PB_StringBase]
!MOV [esp+4],eax
!MOV eax, dword [PB_MemoryBase]
!MOV [esp+8],eax
HeapReAlloc_(PBMemoryBase, #GMEM_ZEROINIT, PBStringBase, Bytes)
!MOV dword [_PB_StringBase],eax
EndProcedure
JOAQUIN
- Hroudtwolf
- Addict

- Posts: 803
- Joined: Sat Feb 12, 2005 3:35 am
- Location: Germany(Hessen)
- Contact:
-
gnozal
- PureBasic Expert

- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Look in Win32.hlp, search for EM_STREAMIN.
There is an example in the purebasic editor sources ( file 'Purebasic Ide.pb' at http://cvs.purebasic.com/ ), search for 'stream'.
There is an example in the purebasic editor sources ( file 'Purebasic Ide.pb' at http://cvs.purebasic.com/ ), search for 'stream'.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
- Hroudtwolf
- Addict

- Posts: 803
- Joined: Sat Feb 12, 2005 3:35 am
- Location: Germany(Hessen)
- Contact:
-
gnozal
- PureBasic Expert

- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
If you want to read big textes into a variable, you will always have the string limitation problem ; why not use a memory buffer and the #WM_GETTEXT or #EM_GETSELTEXT messages ?
Code: Select all
; Something like this :
*TextBuffer = LocalAlloc_(#LMEM_ZEROINIT, NumberOfCaractersToCopy+1)
SendMessage_(RichEditGadgetHandle, #WM_GETTEXT, NumberOfCaractersToCopy+1, *TextBuffer)For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
- Hroudtwolf
- Addict

- Posts: 803
- Joined: Sat Feb 12, 2005 3:35 am
- Location: Germany(Hessen)
- Contact:
