Re: Problem with [SWITCH ... SWITCH]

From: <MSmith_at_ysi.com>
Date: Fri, 27 Sep 2002 16:23:55 -0400

Untested, but try using WPARAM in place of KEY. See the api help under
WM_CHAR if this doesn't work. You may also need to mask off using
something like LOWORD.

Matt

                      Richard Owlett
                      <rowlett_at_atlascom To: "sftalk_at_forth.com" <sftalk_at_forth.com>
                      m.net> cc:
                      Sent by: Subject: [sftalk] Problem with [SWITCH ... SWITCH]
                      sftalk-bounce_at_for
                      th.com

                      09/27/02 03:51 PM
                      Please respond to
                      sftalk

I've modified MAGNIFY.F to read

: DECREASE_MAGNIFICATION ZOOM 10 + TO ZOOM ;
: INREASE_MAGNIFICATION ZOOM 10 - DUP 0> NOT IF DROP 10 THEN TO ZOOM
;

[SWITCH ADJUST_MAGNIFICATION DROP
   43 RUNS INREASE_MAGNIFICATION ; \ + key
   45 RUNS DECREASE_MAGNIFICATION ; \ - key
SWITCH]

[+SWITCH MAG-MESSAGES
   WM_CREATE RUN: HWND 0 50 0 SetTimer DROP 0 ;
   WM_TIMER RUN: MAGNIFY 0 ;
   WM_CLOSE RUN: 0 KillTimer DROP HWND DestroyWindow DROP 0 ;
   WM_CHAR RUN: KEY ADJUST_MAGNIFICATION 0 ;
   WM_LBUTTONDOWN RUN: DECREASE_MAGNIFICATION 0 ;
   WM_RBUTTONDOWN RUN: INREASE_MAGNIFICATION 0 ;
SWITCH]

Everything is fine for mouse clicks.
ANY keypress causes an ABORT.
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe sftalk" to listar_at_forth.com
For help with listar commands, send subject "help" to listar_at_forth.com
Archives are located at http://www.forth.com/sftalk -- check them out!
Search the archives! Visit http://www.forth.com/search for details.

----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe sftalk" to listar_at_forth.com
For help with listar commands, send subject "help" to listar_at_forth.com
Archives are located at http://www.forth.com/sftalk -- check them out!
Search the archives! Visit http://www.forth.com/search for details.
Received on Fri Sep 27 2002 - 13:23:50 PDT


Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!

This archive was generated 02-Sep-2010. Archive updated nightly.