News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

edit box limit 15 digits ??

Started by mikeburr, October 29, 2021, 06:23:49 AM

Previous topic - Next topic

mikeburr

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

fearless

Seems strange: using EM_LIMITTEXT or EM_SETLIMITTEXT can increase the amount of chars, but before used those messages state:

QuoteBefore EM_LIMITTEXT is called, the default limit for the amount of text a user can enter in an edit control is 32,767 characters
QuoteBefore EM_SETLIMITTEXT is called, the default limit for the amount of text a user can enter in an edit control is 32,767 characters
QuoteFor 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.

mikeburr

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

mikeburr

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

jj2007

It could have been a style issue, too. Attachment has two edit controls, one blocks at the end, the other doesn't.


mikeburr

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





mikeburr

@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