How do I transfer value from register to window in correct format?

let's say I have in eax number 23d3e9 and want to show it in my edit , problem is that number is shown in binary format somethin' like this ?-

how do I convert it?
Posted on 2006-09-25 12:50:00 by Aeon
use an api like wsprintf for the job. Example:

szTemp db 128 dup (0)
szTemplate db "%li",0
invoke wsprintf, addr szTemp, addr template, eax

and then show the Buffer in the Edit Window.
Posted on 2006-09-25 13:25:41 by JimmyClif
you can use SetDlgItemInt api function, if you wish to show it in decimal.
Posted on 2006-09-25 23:28:06 by Shoo
or there are functions in masm library

Posted on 2006-09-29 12:32:55 by sonic
I used to believe that dwtoa was an optimized procedure for that until I found the following in the file:

fMtStrinG db "%lu",0
dw2a proc dwValue:DWORD, lpBuffer:DWORD

    ; -------------------------------------------------------------
    ; convert DWORD to ascii string
    ; dwValue is passed as a value, direct, indirect or in register
    ; lpBuffer is the ADDRESS of the receiving buffer
    ; EXAMPLE:
    ; invoke dw2a,edx,ADDR buffer
    ; -------------------------------------------------------------
    invoke wsprintf,lpBuffer,ADDR fMtStrinG,dwValue


dw2a endp
Posted on 2006-09-29 13:09:40 by JimmyClif