hi. i just had a trainer tutorial. I'd like to see your opinion about it and for the ASM gurus like fodder, hutch,etc... i need some optimizations if you see one. the link is:


and don't dare look at the other stuff, sorry for that people. I'm gonna delete it soon. just look at the tutorial. thanx ;)

I would also like to point out that gamehacking or game cheating is 100% legal
Posted on 2001-11-22 03:34:21 by Tsongkie[ii]
Hello. I don't really know a lot about optimizations, but to me, it looks like you can save some space by getting rid of ErrorCaption. If you pass NULL to the Mesagebox function, it will put error in the title bar automaticlly. But like I said, I don't know much, so who knows.
Posted on 2001-11-22 04:51:32 by AlexEiffel
Here are some optimization suggestions:

Invoke LoadIcon, hInstance, Icon1
mov _hanicon, eax

push eax
Invoke SendMessage, hwndDlg, WM_SETICON, FALSE, eax
pop eax

...change to:

Invoke LoadIcon, hInstance, Icon1
mov _hanicon, eax

Invoke SendMessage, hwndDlg, WM_SETICON, FALSE, eax
mov eax, _hanicon

You should also use 'eax' instead of 'ax' in as many places as possible.

Change the colors of the text also! Some text is almost invisible.
Posted on 2001-11-22 05:01:41 by gliptic
push eax
Invoke SendMessage, hwndDlg, WM_SETICON, FALSE, eax
pop eax

you don't have to do this, you're in a nested loop so
if WM_INITDIALOG is posted to your quene and you
respond to this msg the control is given back to kernel
at the end of your messagehandler. just cut push/pos
and ret.

anyway, a normal dilogboxcallback procedure should
end with

mov eax,FALSE
mov eax,TRUE
DlgProc endp

your proc ends with a single ret...

and why do you check in your 'Aboutbox' buttoncheck
BN_CLICKED again? you#ve done the shr eax,16, too
but then... you don't need the BN_CLICKED in smaller
apps, use

mov eax,wParam
.IF ax == ButtonID
Posted on 2001-11-22 21:01:22 by _mob
thanks y'all

BTW, the button thing, i just had it from iczelions tut. could you explain more?
Posted on 2001-11-23 05:45:22 by Tsongkie[ii]

Try this,

mov ax, [ebp+16] ; notification code
mov cx, [ebp+18] ; control handle

In most instances you only need to trap the lParam
to get the control ID in a WM_COMMAND message.


Posted on 2001-11-23 06:53:46 by hutch--