programming tools for Windows applications development
  Home  |   SwiftForth Archive  |   SwiftX Archive  |

Re: circle in window, 34 line

From: Charles Melice <mail_at_forthcad.com>
Date: Tue, 17 Aug 1999 07:37:02 +0100

\ ---------------------------------
\ ABC.F - 34 lines to draw a circle
\ ---------------------------------

FUNCTION: Ellipse ( hdc left top right bottom -- flag )

\ -A-
:NONAME ( -- res )
    MSG CASE
        WM_PAINT OF
            HWND HERE BeginPaint >R \ here => PAINTSTRUCT
            R@ 10 10 110 110 Ellipse drop
            HWND HERE EndPaint drop
            R> drop
            0 EXIT
            ENDOF
    ENDCASE
    HWND MSG WPARAM LPARAM DefWindowProc ; 4 CB: CircleWindowProc

\ -B-
Z" CIRCLE-CLASS" CircleWindowProc DefaultClass VALUE hCircleClass

\ -C-
: TEST ( -- )
    0 \ extended window style
    hCircleClass \ address of registered class name
    Z" Just a circle" \ address of window name
    WS_OVERLAPPEDWINDOW WS_VISIBLE OR \ window style
    CW_USEDEFAULT dup 200 150 \ window position and size
    0 \ handle of parent or owner window
    0 \ handle of menu or child-window identifier
    HINST \ handle of application instance
    0 \ address of window-creation data
    CreateWindowEx drop ;

\\ EOF

----------
> De : SF Talk <sftalk_at_forth.com>
> A : SF Talk <sftalk_at_forth.com>
> Objet : circle in window
> Date : mardi 17 août 1999 3:33
>
> Date: Mon, 16 Aug 1999 20:59:56 -0500
> From: "Marc Hawley" <Marc_Hawley_at_email.msn.com>
> Subject: circle in window

.
Received on Tue Aug 17 1999 - 07:37:02 PDT

This archive was generated by hypermail 2.2.0 : Thu Nov 20 2008 - 03:04:26 PST