The MASM Forum

64 bit assembler => 64 Bit Assembler => Topic started by: mikeburr on October 29, 2021, 06:23:49 AM

Title: edit box limit 15 digits ??
Post by: mikeburr on October 29, 2021, 06:23:49 AM
64 bit ....seem to only be able to accept 15 digits via the edit box ... wd have thought this wd be closer to 19 so surprised
any comments wd be helpful  [the box is defined as large enough to accept about 25 .. defined as numeric but defining it as char = same limit]
regards  mike b
Title: Re: edit box limit 15 digits ??
Post by: fearless on October 29, 2021, 06:33:39 AM
Seems strange: using EM_LIMITTEXT or EM_SETLIMITTEXT can increase the amount of chars, but before used those messages state:

Quote
Before EM_LIMITTEXT is called, the default limit for the amount of text a user can enter in an edit control is 32,767 characters
Quote
Before EM_SETLIMITTEXT is called, the default limit for the amount of text a user can enter in an edit control is 32,767 characters
Quote
For single-line edit controls, the text limit is either 0x7FFFFFFE bytes or the value of the wParam parameter, whichever is smaller.

Maybe check that its not being set somewhere to 15 chars length.
Title: Re: edit box limit 15 digits ??
Post by: mikeburr on October 29, 2021, 06:40:06 AM
yes.. in fact in 32 bit i accept 4000 chars validated then as digits no problem ... so im a bit befuddled to find its only accepting 15 even as char !!  but ill check thoroughly again
regards   mike b
Title: Re: edit box limit 15 digits ??
Post by: mikeburr on October 29, 2021, 07:04:55 AM
ok found it... no idea how i didnt see that id set the text limit in the getdlgitem  to 16 ..doh [donkey ears have appeared
thanks though
regards mikeb
Title: Re: edit box limit 15 digits ??
Post by: jj2007 on October 29, 2021, 07:25:14 AM
It could have been a style issue, too. Attachment has two edit controls, one blocks at the end, the other doesn't.

Title: Re: edit box limit 15 digits ??
Post by: mikeburr on October 29, 2021, 07:56:46 AM
i havent read your reply yet JJ
but i vaguely remember some of the oddities with setdlgitemint and why i ended up putting 16 in as a limit [bizarrely resulting in a 15 digit limit !!]
the limit on a numeric edit box seems to be 17 digits regardless of set limit ...
also [ setDlgItemInt ]
when setting r8 with a default larger than 32 bit limit 9 digits displays incorrectly ..resetting r9 to true [signed value shows a negative value] so it doesnt appear the display peculiarity is due to the true / false r9 setting
regards mike b
structure of call looks as follows
mov rcx,hwnd
mov rdx,200 ; box id
mov r8,12345678901 ; initial display value
mov r9,False ;unsigned numbers
call  SetDlgItemInt  ;call numeric display .. max length set to 20




Title: Re: edit box limit 15 digits ??
Post by: mikeburr on November 05, 2021, 09:29:30 AM
@hutch
looks like an ERROR in winextra.inc
set / getDlgItemInt length is determined by UINT_MAX... this is set 32 bit high and sb 64bit high .. this doesnt seem to help set / getDlgItemInt which still defaults to 32bit [8 digits]
im having to validate text  to get 17
regards mike b