The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: elmo on October 19, 2010, 06:17:31 AM

Title: Please help me to make unlimited string length of EditBox in MASM32
Post by: elmo on October 19, 2010, 06:17:31 AM
I found example in
\masm32\examples\exampl02\qikpad  to save a file.

It only can contains 1000 lines 1000 columns..
Can you help me to make it become unlimited lines and columns.

Thank you
Fritz Gamaliel
Title: Re: Please help me to make unlimited string length of EditBox in MASM32
Post by: jj2007 on October 19, 2010, 06:50:51 AM
;     QikPad is a functional text editor written around a normal edit
;     control. It has a size limit of 32k which is dictated by the
;     operating system for a control of this type.
Title: Re: Please help me to make unlimited string length of EditBox in MASM32
Post by: Farabi on October 19, 2010, 10:15:05 PM
Try to use richedit, but I dont know will it have unlimited line of chars.
Title: Re: Please help me to make unlimited string length of EditBox in MASM32
Post by: Antariy on October 19, 2010, 10:30:08 PM
Quote from: FritzCAT22 on October 19, 2010, 06:17:31 AM
I found example in
\masm32\examples\exampl02\qikpad  to save a file.

It only can contains 1000 lines 1000 columns..
Can you help me to make it become unlimited lines and columns.

Thank you
Fritz Gamaliel

Use this, hWnd is a handle of main window, which contain an Edit, IdCtl is an ID of Edit control.

invoke SendDlgItemMessage,hWnd,IdCtl,EM_LIMITTEXT,7FFFFFFEh,0


7FFFFFFEh - is a max size of text which can be entered. You can use any value.

This allow you enter about 2GB of text into Edit control under Windows NT. 64 KB limit is under Win9x.



Alex
Title: Re: Please help me to make unlimited string length of EditBox in MASM32
Post by: jj2007 on October 19, 2010, 10:44:56 PM
Alex is right - I stand corrected.

QuoteEM_LIMITTEXT Message (http://msdn.microsoft.com/en-us/library/bb761607%28VS.85%29.aspx)

Sets the text limit of an edit control. The text limit is the maximum amount of text, in TCHARs, that the user can type into the edit control. You can send this message to either an edit control or a rich edit control.