h4t Posted May 29, 2014 Posted May 29, 2014 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" base.zip
Dreamer Posted May 29, 2014 Posted May 29, 2014 https://forum.tuts4you.com/topic/30705-silences-programmings-tour-masm32-general-edition/?hl=%2Bsilence+%2Bprogramming+%2Btour
h4t Posted May 29, 2014 Author Posted May 29, 2014 (edited) Okay but is there sombody there will fix my project? because is to hard for a newbie Edited May 29, 2014 by h4t
sama Posted May 29, 2014 Posted May 29, 2014 (edited) .dataDTbase dd S1S1 db "Frozen",0mov ecx,1xor edx,edxidiv ecxmov eax,dword ptr[edx*1+DTbase]invoke SetDlgItemText,hWin,1002,eaxmov ecx,1xor edx,edxidiv ecxmov eax,dword ptr[edx*1+DTbase]invoke SetDlgItemText,hWin,1006,eaxyou passing in both cases the same arguments so both will appear in your editboxes! Edited May 29, 2014 by sama
h4t Posted May 29, 2014 Author Posted May 29, 2014 (edited) Okay... How can i fix that? Edited May 29, 2014 by h4t
sama Posted May 29, 2014 Posted May 29, 2014 (edited) .dataDTbase db "Frozen",0S1 db "1234567890",0mov ecx,1xor edx,edxidiv ecxlea eax,DTbaseinvoke SetDlgItemText,hWin,1002,eaxmov ecx,1xor edx,edxidiv ecxlea eax,S1invoke SetDlgItemText,hWin,1006,eax Edited May 29, 2014 by sama
h4t Posted May 29, 2014 Author Posted May 29, 2014 (edited) Thank you so much, now it's works! I So happy thanks thanks thanks for your help Edited May 29, 2014 by h4t
kao Posted May 29, 2014 Posted May 29, 2014 If you're not willing to learn and do it yourself, you're in the wrong place. Here's something more appropriate for you: http://games.disney.com/ 2
sama Posted May 29, 2014 Posted May 29, 2014 (edited) .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 May 29, 2014 by sama
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now