Jump to content
Tuts 4 You

Help needed! In WinASM Studio


h4t

Recommended Posts

Help needed!

 

I want to be able to push one button only, and when I do it the text in the two boxes will be different. I want to just push the bottun and then the different texts are visible, but without me needing to write anything in the 'name' box, then push 'keygen' and then the serial is visible. ONLY me pushing 'keygen' and then both name and serial will appear. I can only get the same text in both 'name' and 'serial' boxes to appear when pressing 'keygen' button.

 

I using "WinAsm Studio"

 


nHdGgnND.pngnUluhnND.png


base.zip

Link to comment

Okay but is there sombody there will fix my project? because is to hard for a newbie


Edited by h4t
Link to comment

.data

DTbase dd S1

S1 db "Frozen",0

mov ecx,1

xor edx,edx

idiv ecx

mov eax,dword ptr[edx*1+DTbase]

invoke SetDlgItemText,hWin,1002,eax

mov ecx,1

xor edx,edx

idiv ecx

mov eax,dword ptr[edx*1+DTbase]

invoke SetDlgItemText,hWin,1006,eax

you passing in both cases the same arguments so both will appear in your editboxes!

Edited by sama
Link to comment

.data

DTbase db "Frozen",0

S1 db "1234567890",0

mov ecx,1

xor edx,edx

idiv ecx

lea eax,DTbase

invoke SetDlgItemText,hWin,1002,eax

mov ecx,1

xor edx,edx

idiv ecx

lea eax,S1

invoke SetDlgItemText,hWin,1006,eax

Edited by sama
Link to comment

.data

DTbase db "Frozen",0

Format db "%d",0

.data?

hInstance dd ? ;dd can be written as dword

S1 dd ?

Serial db 32 dup (?)

DlgProc proc hWin :DWORD,uMsg :DWORD,wParam:DWORD,lParam :DWORD

.if uMsg == WM_COMMAND

.if wParam == IDC_OK

; -----------------------------------------------------------------------

lea eax,DTbase

invoke SetDlgItemText,hWin,1002,eax

lea esi, DTbase

xor eax,eax

mov ecx,sizeof DTbase

@@:

mov al, byte ptr[esi]

add S1,eax

inc esi

dec ecx

jnz @B

invoke wsprintf,addr Serial,addr Format, S1

invoke SetDlgItemText,hWin,1006,addr Serial

; -----------------------------------------------------------------------

.endif

.elseif uMsg == WM_CLOSE

invoke EndDialog,hWin,0

.elseif uMsg == WM_INITDIALOG

.endif

xor eax,eax

ret

DlgProc endp

this get your name and applicate it to editbox 1

then from name it calculate the sum and applicate it into editbox 2

 

now you can choose what you want

Edited by sama
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...