home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / os2 / programm / 7162 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.6 KB  |  48 lines

  1. Newsgroups: comp.os.os2.programmer
  2. Path: sparky!uunet!van-bc!dds4!lum
  3. From: lum@dds4.uucp (Michael Lum)
  4. Subject: Spin Button question
  5. Message-ID: <1992Dec21.180028.8561@dds4.uucp>
  6. Organization: Digital Dispatch Systems, Richmond BC
  7. Date: Mon, 21 Dec 92 18:00:28 GMT
  8. Lines: 38
  9.  
  10. I'm having problems getting a spin button to work properly:
  11.  
  12. Here is a fragment of my dialog file:
  13.  
  14.     LTEXT           "Dial Retries:", -1, 19, 120, 49, 8, NOT WS_GROUP
  15.     CONTROL         "", DC_GENAUTHRETRY, 118, 119, 30, 12, WC_SPINBUTTON, 
  16.             SPBS_ALLCHARACTERS | SPBS_MASTER | 
  17.             SPBS_SERVANT | SPBS_JUSTDEFAULT | WS_TABSTOP | 
  18.             WS_VISIBLE
  19.  
  20. Here is the code that is trying to set the limits on the spin button,
  21. and then set the current value:
  22. ( I copied most of this from /toolkt20/c/samples/wpcar/car.c )
  23.  
  24.     WinSendDlgItemMsg( hwnd, DC_GENAUTHRETRY, SPBM_SETLIMITS,
  25.     MPFROMLONG( GENAUTHRETRY_HIGH ), MPFROMLONG( GENAUTHRETRY_LOW ) );
  26.     WinSendDlgItemMsg( hwnd, DC_GENAUTHRETRY, SPBM_SETCURRENTVALUE,
  27.     MPFROMLONG( gen_parms.authretry ), MPFROMLONG( 0 ) );
  28.  
  29. The limits for the spin button are correct.
  30. The spin buttons spin properly.
  31. I can retrieve the value properly.
  32.  
  33. The VALUE becomes 0 for this button and 1 for the second spin button
  34. I have created right after it.
  35.  
  36. How do I set the value?
  37.  
  38. 'gen_parms.authretry' is a ULONG
  39.  
  40.  
  41. By the way I am using GCC with EMX 0.8e.
  42.  
  43. Thanks for any help.
  44. -- 
  45. | Michael Lum                                           dds4!lum@wimsey.bc.ca |
  46. | Digital Dispatch Systems, Richmond BC                   Fax: (604) 270 9160 |
  47. | ...they say Confucius does his crossword with a pen...            Tori Amos |
  48.