News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

dialogboxparam x64 [resolved]

Started by Duracell, August 15, 2010, 07:41:55 AM

Previous topic - Next topic

Duracell


I have a little problem with this code.


Main proc
    xor rcx, rcx
    call GetModuleHandleA
sub rsp, 30h
    mov rsp, 0
    lea r9, DialogMain
    mov r8, 0
    mov rdx, 1000h
    mov rcx, rax
    call DialogBoxParamA
add rsp, 30h
ret

DialogMain proc ;hDlg=rcx uMsg=rdx wParam=r8 lParam= r9
    cmp rdx,  WM_CLOSE
    jne @F
    sub rsp, 12h
    End_Dialog rcx, 0
    add rsp, 12h
@@:
    xor rax, rax
    ret

DialogMain endp
Exit_Process
Main endp
end


It's compiled but don't worked...

any suggestions?

evlncrn8

you need to handle WM_INITDIALOG too, and return TRUE for it if i remember right

Duracell

It doesn't work because memory was wrong. Should be 38h reserved.