News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

multiline edit

Started by ragdog, December 15, 2007, 11:13:50 AM

Previous topic - Next topic

ragdog

hi

i search a example with multiline editbox thats limited of 62 signs per line

have your any example or idea?

greets
ragdog

jj2007

Subclass and write an own wrapping routine...

ragdog

I have a example
if press backspace delete it double signs can one that solve with registerhotkey somehow

thanks

[attachment deleted by admin]

MichaelW

I think the problem is in your code. When the line length reaches 62 characters, what is supposed to happen? If wrapping is acceptable, why not disable horizontal scrolling and set the width of the edit control so only 62 characters will fit?
eschew obfuscation

ragdog

this example is on 5 sings limited per line
I needs this because I contents in a file to write would like which only on 62 signs per line is limited

my problem is
if I backspace press that it 2 signs delete it am only one signs to delete

sorry my english

Tedd

If you only need the 62 chars per line in the file, why not take the input and format it for 62 chars per line when writing to the file?
No snowflake in an avalanche feels responsible.

ragdog

hi

i have a example this format  per line 62 chars
but if I do write more 62 chars in editbox functioned that not
I have written this limited editbox my problem is this a example delete doubles chars with backspace

I have try it with registerhotkey to solve this problem I do not get ahead thereby

greets
ragdog

Tedd

Okay, I tried it and saw the problem :wink
Type some characters, then press backspace to delete one and it actually deletes two instead. Except, it seems, at the end of the line (which may simply have something to do with the newline character.)
My first guess would be that when you press backspace, you delete a character from your hot-key handler, but then the edit box also deletes a character because backspace was pressed (and this is what it should do.)
So.. you could filter out the backspace press so the edit box doesn't receive it, but why do you need the hotkey anyway? Just allow the edit box to handle all of the input, and you fix the line length on EN_UPDATE (though you'll have to re-break the line when a character is inserted into the middle of the line.)
No snowflake in an avalanche feels responsible.