Page 5 of 6

Re: EditBox control: increase capacity

Posted: Sat Jul 27, 2013 1:43 am
by esgici
Hola Eduardo
EduardoLuis wrote: ... again limits appear....
No, no limits but some innovations to learn ;)

Before I must clarify : the goal of my intervention to this topic was for text files and memo fields limits.

Though Increasing EditBox capacity was main subject, your first question was not about that.

Now, your last problem is about this main subject :(

Fortunately our second master Dr. Claudio is a real genius :D

Now you need follow instructions of our doc at the beginning of topic; in summary :

Code: Select all

#define EM_LIMITTEXT 197

SendMessage (GetControlHandle("EditBox_1","Form_1"), EM_LIMITTEXT, 0, 0)

MSG_SETTEXT (GetControlHandle("EditBox_1","Form_1"), cHugeText)

cHugeText := MSG_GETTEXT (GetControlHandle("EditBox_1","Form_1"))
and add a "small" #pragma to your program :mrgreen:

Or simply follow my slightly modified sample :
Memo limits and EditBox capacity test results
Memo limits and EditBox capacity test results
MmoLmTst2.JPG (130.37 KiB) Viewed 5880 times
MmoLmTst2.zip
Memo limits and EditBox capacity tests Sources
(136 Bytes) Downloaded 264 times
Viva HMG, viva Roberto Lopez, viva Dr. Claudio Soto :D

Re: EditBox control: increase capacity

Posted: Sat Jul 27, 2013 3:02 am
by srvet_claudio
esgici wrote:Now you need follow instructions of our doc at the beginning of topic; in summary :
Code:
#define EM_LIMITTEXT 197

SendMessage (GetControlHandle("EditBox_1","Form_1"), EM_LIMITTEXT, 0, 0)

MSG_SETTEXT (GetControlHandle("EditBox_1","Form_1"), cHugeText)

cHugeText := MSG_GETTEXT (GetControlHandle("EditBox_1","Form_1"))

and add a "small" #pragma to your program
A small suggestion, puts MAXLENGTH to 0 in EditBox control which has the same effect.
Best regards,
Claudio.

Re: EditBox control: increase capacity

Posted: Sat Jul 27, 2013 12:34 pm
by esgici
srvet_claudio wrote:...
A small suggestion, puts MAXLENGTH to 0 in EditBox control which has the same effect.
...
This is a typical Windows logic : set maximum limit to overcome the limitation :!:

... and worked :o

In this case, seems MSG_SETTEXT() function is unnecessary furthermore, is this correct ?

By the way can I make a suggestion :

renaming MSG_GETTEXT() and MSG_SETTEXT() functions as GetEditBoxValue() and SetEditBoxValue() be may more convenient ?

In other hand, hopefully you may find other ways ( such as changing internal size limits of HMG ) else you may add this low level ( #pragma ) routine to the core of HMG.

Anyway, immense thanks to your immense participation and invaluable improvement to HMG :D

Re: EditBox control: increase capacity

Posted: Sat Jul 27, 2013 1:27 pm
by bpd2000
esgici wrote:Hola Eduardo
EduardoLuis wrote: ... again limits appear....
No, no limits but some innovations to learn ;)

Before I must clarify : the goal of my intervention to this topic was for text files and memo fields limits.

Though Increasing EditBox capacity was main subject, your first question was not about that.

Now, your last problem is about this main subject :(

Fortunately our second master Dr. Claudio is a real genius :D

Now you need follow instructions of our doc at the beginning of topic; in summary :

Code: Select all

#define EM_LIMITTEXT 197

SendMessage (GetControlHandle("EditBox_1","Form_1"), EM_LIMITTEXT, 0, 0)

MSG_SETTEXT (GetControlHandle("EditBox_1","Form_1"), cHugeText)

cHugeText := MSG_GETTEXT (GetControlHandle("EditBox_1","Form_1"))
and add a "small" #pragma to your program :mrgreen:

Or simply follow my slightly modified sample :

Viva HMG, viva Roberto Lopez, viva Dr. Claudio Soto :D
Sir, this MmoLmTst2.zip attachment has only .hbp file other files are missing

Re: EditBox control: increase capacity

Posted: Sat Jul 27, 2013 1:46 pm
by esgici
bpd2000 wrote:..., this MmoLmTst2.zip attachment has only .hbp file other files are missing
Sorry friends :oops:

Thank to warn Dave :)

Regards

Re: EditBox control: increase capacity

Posted: Sat Jul 27, 2013 2:26 pm
by srvet_claudio
esgici wrote:In this case, seems MSG_SETTEXT() function is unnecessary furthermore, is this correct ?
Yes, is correct!!!
esgici wrote: By the way can I make a suggestion :

renaming MSG_GETTEXT() and MSG_SETTEXT() functions as GetEditBoxValue() and SetEditBoxValue() be may more convenient ?

In other hand, hopefully you may find other ways ( such as changing internal size limits of HMG ) else you may add this low level ( #pragma ) routine to the core of HMG.

Anyway, immense thanks to your immense participation and invaluable improvement to HMG :D
In the next release, these functions are not necessary because they are part of the internal logic of the TextBox, just use Form.TextBox.Value

Re: EditBox control: increase capacity

Posted: Sat Jul 27, 2013 2:31 pm
by esgici
Thanks doc :D

Re: EditBox control: increase capacity

Posted: Sat Jul 27, 2013 7:31 pm
by esgici
srvet_claudio wrote: Yes, is correct!!!
Well,

this is rectified ( 3rth ) version of test prg
EdBoxSize.JPG
EdBoxSize.JPG (79.67 KiB) Viewed 5824 times
MmoLmTst3.zip
(2.08 KiB) Downloaded 425 times
Enjoy !

Re: EditBox control: increase capacity

Posted: Mon Jul 29, 2013 2:03 pm
by EduardoLuis
Hi Esgici, Dr. Soto, Rati, & all HMG Genious members

First i'm sorry not answering you since your saturdays post, but i've no internet at home so i must wait till today to see your powerfull posts.-
I've download your las MmoLmTst.-
First i've seen the code and a cold wind runs behind my neck "UNICODE", because i've lots of problems with it, specially on printing PDF reports.- That's the reason why i perform using 3.14 HMG IDE.-
Then i compile the prg and test and all works really FINE.-
I test very deep, also using DBF / DBT / NTX table format and index, and all was right.-
No ERRORS, No BUGGS.-
I'll implement this excellent routine on my developing.-
THANK YOU TOO MUCH for helping me to grow up on my knowledge of HMG language.-
With regards. Eduardo

Re: EditBox control: increase capacity

Posted: Mon Jul 29, 2013 2:14 pm
by esgici
Hola Eduardo

I'm glad by seeing you happy :)

Yes, you are rigth; all we are should a bit more work for Unicode; but I believe it's worth it :)

Viva HMG, viva Roberto Lopez, viva Rathi, viva Dr. Soto and viva all supporters of HMG :D