;<ff
Window FormLabel, 2, 0, 'TForm', 'TForm window', $16080000, $0, 0, 201, 191, 320, 240, CustomWinProc;
;ff>

;-----------------------------------------------------------------------
; Window procedure for the form.
; Arguments:
;   .hwnd - handle of the window
;   .wmsg - code of the message
;   .wparam \ Parameters of the message
;   .lparam /
;-----------------------------------------------------------------------

proc MainFormWinProc, .hwnd, .wmsg, .wparam, .lparam
begin
;-----------------------------------------------------------------------
; Write here the code that have to be executed before
; message dispatching.
;-----------------------------------------------------------------------

       dispatch [.wmsg]

.ondefault:

        stc
        return

; Process messages with "oncase" macro:

; oncase WM_MOUSEMOVE

; you message processing code here.

;       clc                     ; reset CF before returning if the message need not to be
                                ; passed to the original message handler.
;       xor     eax, eax        ; return result in EAX
;       return

; uncomment

        enddispatch

endp
