Hi all,

I am studying


from masm version 7

My question:

How do I add a fourth Edit box, which is read-only (cannot be typed in), so that I can output an error message to this read only edit box, whenever someone keys in characters in the numerical box

Please amend the original asm file so that I can compare and analyse. Tq.
Posted on 2001-11-27 19:13:01 by testing999

2 methods come to mind, copy the procedure that creates the edit control and add a style ES_READONLY to the second one so that the control will not accept user input.

The second is to use the subclass type that the rest have but throw away all keystrokes that are typed into the control. Either way will work, probably the ES_READONLY is the easiest to do.


Posted on 2001-11-27 19:31:47 by hutch--
Sorry to ask so many questions (still a very new newbie in ASM)

hutch, Is this what you meant?

(a) copy the procedure that creates the edit control

invoke EditS2,ADDR nulbyte,120,70,200,23,hWin,203
mov hEdit4, eax

(b) add a style ES_READONLY to the second one

EditS2 proc szMsg:DWORD,a:DWORD,b:DWORD,

szText slEdit,"EDIT"

invoke CreateWindowEx,WS_EX_CLIENTEDGE,ADDR slEdit,szMsg,


EditS2 endp
Posted on 2001-11-27 19:56:12 by testing999

I don't normally write code on request but I used to go to high school once myself so I wrote up the idea you were looking for.


Posted on 2001-11-27 23:07:43 by hutch--
Hutch went to high school? Did you know George Washington??? :grin:
Posted on 2001-11-27 23:59:30 by S/390
Hutch was too busy kicking Doug Engelbart around to pay much attention :grin:
Posted on 2001-11-28 01:09:21 by Hiroshimator
Hi Hutch,

Thank you so much for the reply ...

Before you posted the zip file, I tried amending the asm file, and I managed to get the readonly box out. However, couldn't get it to update the readonly box.

With your new asm file, I know understand where my mistakes are.

Thank you again for your help, really appreciated.

Hope to write a decent asm program in 3 months ...
Posted on 2001-11-28 02:02:56 by testing999
Boy, am I dumb! I posted an answer in the wrong thread!

Where is the delete button?

it's under your 'Edit' options -->
Posted on 2001-11-28 02:45:38 by kefren

Right era, wrong continent, Captain Cook was poking around Botany Bay at about the same time, its about 5 miles south of where I live. :tongue:


who is Doug Engelbart ?


Posted on 2001-11-28 03:09:02 by hutch--
The inventor of the mouse ( and other things) ;)
Posted on 2001-11-28 05:22:17 by Hiroshimator
really !?!?
I didn't think that it was a man who invented the mouse! How can I make my own animal ?
And who invented the fish ?

OK, no funny...;)
Posted on 2001-11-28 12:53:32 by Vom-bonjour:-()
I invented a shooter...

I called it Posted on 2001-11-28 23:18:15 by NaN