Pelles C forum

Assembly language => Assembly discussions => Topic started by: Vortex on November 02, 2025, 10:14:04 AM

Title: Rich Edit sample
Post by: Vortex on November 02, 2025, 10:14:04 AM
Inspired by Timo's work, here is the Rich Edit sample converted to Poasm :

https://forum.pellesc.de/index.php?msg=41554

include DlgBox.inc

.code

start:

    mov     eax,RichEditANSIWndProc
    invoke  GetModuleHandle,0
    invoke  DialogBoxParam,eax,DLG_MAIN,0,ADDR DlgProc,0
    invoke  ExitProcess,eax

DlgProc PROC hWnd:DWORD,uMsg:DWORD,wParam:DWORD,lParam:DWORD

    .IF uMsg==WM_CLOSE

        invoke  EndDialog,hWnd,0

    .ELSE

        xor     eax,eax
        ret

    .ENDIF

    mov     eax,1
    ret

DlgProc ENDP

END start