this is regarding icz tut #9,i want to create 2 edit box ,i dunno where i am going wrong only the button is being created.could you guuide me where i am going wrong???

invoke CreateWindowEx,WS_EX_CLIENTEDGE,addr Edit1Class,addr Edit1Text, \

ES_LEFT or WS_CHILD or WS_VISIBLE or ES_AUTOHSCROLL, 500,50,100,35, hWnd,NULL,hInstance,NULL

mov hEdit1,eax

invoke CreateWindowEx,WS_EX_CLIENTEDGE,addr Edit2Class,addr Edit2Text, \
ES_LEFT or WS_CHILD or WS_VISIBLE or ES_AUTOHSCROLL, 565,70,100,35, hWnd,NULL,hInstance,NULL

mov hEdit2,eax

invoke CreateWindowEx,NULL,addr ButtonClass,addr ButtonMsg, \
BS_DEFPUSHBUTTON or WS_CHILD or WS_VISIBLE, 190,262,100,50, hWnd,ButtonId,hInstance,NULL

mov hButton,eax

thanks a million
Posted on 2004-05-13 14:29:58 by zyzygygr8

You are showing only a small part of the code so I am only guessing:

You have Edit1Class and Edit2Class. Normally you should have one and only one class (for example EditClassName db "edit",0)

Attached is a modified version of tute09 with 2 edit boxes wrapped as a WinAsm Studio Project

I hope it helps,

Posted on 2004-05-13 15:33:59 by akyprian
hi ,

thanks for your reply ,so if i have only 1 classname for the edit boxes ,then it should work right.
i'll chk it out.

again thnaks for your reply;)
Posted on 2004-05-13 15:38:26 by zyzygygr8

thanks for your reply ,so if i have only 1 classname for the edit boxes ,then it should work right.

Definately yes. There is only one classname (edit, button, ToolbarWindow32, Static etc) for each type of control. The number of controls you create is irrelevant.


Posted on 2004-05-13 15:43:18 by akyprian
i copied your piece of code but it still doesnt show up,could you point out some other reasons why it isnt showing.

Posted on 2004-05-13 15:47:53 by zyzygygr8
ok ,i got it.while defining the classname i had named it as "edit1" .after changing it to edit ,it works.

thanks for your reply
Posted on 2004-05-13 15:50:42 by zyzygygr8

Posted on 2004-05-13 15:50:59 by akyprian
zyzygygr8, the "edit" class name is built into windows. It is a similar concept to the last name of a family - they all have the same last name.

You can create your own class as well and then several instances from that class.
Posted on 2004-05-13 16:17:41 by bitRAKE