TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Craig Morrison
from: Ronnie van.Schaijk
date: 1994-10-14 05:07:02
subject: Spin button controls

Hallo Craig!

Donderdag 06 Oktober 1994 06:08, Craig Morrison schreef aan All:

 CM >   Since the toolkit documentation doesn't go into any detail on the
 CM > SPBM_SETARRAY message. Is the pStrl parameter an array of PSZ's or a
 CM > block of memory containing a double null terminated list of null

The following is a function I made which fills the spinbutton (and it also
sets the size of the text). The arr is a pointer to the array with strings
(See the parameters for an example).

/*
** Parameters : hwnd       Handle of parent window (containing id_control)
**              id_control ID of control of spinbutton
**              size       size of the field
**              arr        pointer to the array with strings
**                         ( char *month[] = { "jan","feb" } )
**              count      number of elements
** Description: Function to set the entries of an text-spinbutton
*/

VOID set_sb_array(HWND hwnd, USHORT id_control, USHORT size, UCHAR *arr[],
USHORT count)
{
   WinSendDlgItemMsg(hwnd, id_control, SPBM_SETTEXTLIMIT,
                            MPFROMSHORT(size), 0L);
   WinSendDlgItemMsg(hwnd, id_control, SPBM_SETARRAY,
                            MPFROMP(arr), MPFROMSHORT(count));
} /* End of function set_sb_array */


Houdoe,

        Ronnie

--- FMail 0.92


* Origin: From Netherlands->Europe->World->Miss Universe (2:512/152.18)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413
SEEN-BY: 711/430 807 808 809 934 942 949 712/353 623 713/888 800/1
@PATH: 512/152 0 4 141/209 270/101 396/1 3615/50 229/2 12/2442
@PATH: 711/409 54/54 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.