Please, take a look at this:
I've tired of thinking what's wrong with this.
CreateWindowEx always returns NULL :( . It works only when I change ID and Style with values from brackets. Look at the attached file: not a handy interface. :)
I guess the answer is simple, but little mistakes are mush more hard to find than big ones.
_MainWndProc_WM_Create:
push 0
push [hInstance]
push Edit1ID (0)
push dword [esp+4]
push 25
push 200
push 35
push 50
push 050800080h (010800080h - non-Child)
push EditText
push EditClassName
push 0200h
call [CreateWindowEx]
mov [hEdit1],eax
I've tired of thinking what's wrong with this.
CreateWindowEx always returns NULL :( . It works only when I change ID and Style with values from brackets. Look at the attached file: not a handy interface. :)
I guess the answer is simple, but little mistakes are mush more hard to find than big ones.
Sorry, attach is here.
It seems to me your are trying to create an edit control, thus it should be a child control.
Hmm.. so that means that you should set the style as WS_CHILD. Furthermore, since it is a child control, I do not think it should have a menu so i think EditID should be 0.
Hmm.. so that means that you should set the style as WS_CHILD. Furthermore, since it is a child control, I do not think it should have a menu so i think EditID should be 0.
Hi, roticv!
If I'm not mistaken, when you create a control the hMenu field becomes an ID of a control. Nevertheless, I tried to push 0 instead of EditID, and it doesn't work.
As for WS_CHILD: 050800080h is the sum of WS_CHILD, WS_VISIBLE, WS_BORDER and ES_AUTOHSCROLL.
Maybe this part of code is not enough. Here is the whole code (a FASM one).
If I'm not mistaken, when you create a control the hMenu field becomes an ID of a control. Nevertheless, I tried to push 0 instead of EditID, and it doesn't work.
As for WS_CHILD: 050800080h is the sum of WS_CHILD, WS_VISIBLE, WS_BORDER and ES_AUTOHSCROLL.
Maybe this part of code is not enough. Here is the whole code (a FASM one).
_MainWndProc_WM_Create:
push 0
push
push 0 ;Edit1ID
push dword ;
push 50
Your offset is wrong using ESP in the push as you have already
modified the stack...
Changing it to something like this should work:
_MainWndProc_WM_Create:
mov ecx, dword
push 0
push
push 0 ;Edit1ID
push ecx ;
push 50
Thanks, Graebel!
Great thanks!
I tried to find the mistake everywhere except this string.
Now everything works fine. :alright: :alright: :alright:
Great thanks!
I tried to find the mistake everywhere except this string.
Now everything works fine. :alright: :alright: :alright: