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

Simple system to send messages to dialog controls.

From: Charles Melice <mail_at_forthcad.com>
Date: Mon, 13 Jan 2003 09:47:07 +0100

I have found usefull the next system to send messages to dialogs controls:

    : DLG-ITEM: ( id-ctrl "name" -- )
        CREATE ,
        DOES> ( wParam lParam Msg 'id -- res )
            HWND SWAP @ GetDlgItem SWAP 2SWAP SendMessage ;

Usage:

    IDC_LISTBOX DLG-ITEM: >>lb ( wParam lParam Msg -- result )

Using the last position for the Msg parameter reduce the stack noise,
and makes the sources more readable.

Example:

    : add-lbstring ( zstr -- )
        0 SWAP LB_ADDSTRING >>lb DROP ;

Charles

----------------------------------------------------------------------
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 Mon Jan 13 2003 - 00:46:24 PST

This archive was generated by hypermail 2.2.0 : Tue Dec 02 2008 - 03:04:28 PST