home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.os2.programmer
- Path: sparky!uunet!van-bc!dds4!lum
- From: lum@dds4.uucp (Michael Lum)
- Subject: Spin Button question
- Message-ID: <1992Dec21.180028.8561@dds4.uucp>
- Organization: Digital Dispatch Systems, Richmond BC
- Date: Mon, 21 Dec 92 18:00:28 GMT
- Lines: 38
-
- I'm having problems getting a spin button to work properly:
-
- Here is a fragment of my dialog file:
-
- LTEXT "Dial Retries:", -1, 19, 120, 49, 8, NOT WS_GROUP
- CONTROL "", DC_GENAUTHRETRY, 118, 119, 30, 12, WC_SPINBUTTON,
- SPBS_ALLCHARACTERS | SPBS_MASTER |
- SPBS_SERVANT | SPBS_JUSTDEFAULT | WS_TABSTOP |
- WS_VISIBLE
-
- Here is the code that is trying to set the limits on the spin button,
- and then set the current value:
- ( I copied most of this from /toolkt20/c/samples/wpcar/car.c )
-
- WinSendDlgItemMsg( hwnd, DC_GENAUTHRETRY, SPBM_SETLIMITS,
- MPFROMLONG( GENAUTHRETRY_HIGH ), MPFROMLONG( GENAUTHRETRY_LOW ) );
- WinSendDlgItemMsg( hwnd, DC_GENAUTHRETRY, SPBM_SETCURRENTVALUE,
- MPFROMLONG( gen_parms.authretry ), MPFROMLONG( 0 ) );
-
- The limits for the spin button are correct.
- The spin buttons spin properly.
- I can retrieve the value properly.
-
- The VALUE becomes 0 for this button and 1 for the second spin button
- I have created right after it.
-
- How do I set the value?
-
- 'gen_parms.authretry' is a ULONG
-
-
- By the way I am using GCC with EMX 0.8e.
-
- Thanks for any help.
- --
- | Michael Lum dds4!lum@wimsey.bc.ca |
- | Digital Dispatch Systems, Richmond BC Fax: (604) 270 9160 |
- | ...they say Confucius does his crossword with a pen... Tori Amos |
-