home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / mswindo / programm / misc / 1288 next >
Encoding:
Text File  |  1992-08-12  |  1.8 KB  |  44 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!chx400!bernina!guy
  3. From: guy@st.ife.ethz.ch (Guy Morbach)
  4. Subject: Re: Greying buttons, listbox items etc.
  5. Message-ID: <guy.713622809@ife0>
  6. Sender: news@bernina.ethz.ch (USENET News System)
  7. Organization: Swiss Federal Institute of Technology (ETH), Zurich, CH
  8. References: <1992Aug5.162432.89666@vaxc.cc.monash.edu.au> <skip.120.713013440@mitre.org> <cchapman.106.713194514@matd.gatech.edu> <1992Aug12.135802.89733@vaxc.cc.monash.edu.au>
  9. Date: Wed, 12 Aug 1992 12:33:29 GMT
  10. Lines: 32
  11.  
  12. che358w@vaxc.cc.monash.edu.au writes:
  13.  
  14. >>
  15. >> To unselect everything, try sending this message to your list box with
  16. >> wParam equal to -1:
  17. >>
  18. >> LB_SETCURSEL
  19. >>
  20. >>         This message selects a string and scrolls it into view, if
  21. >>         necessary. When the new string is selected, the list box removes the
  22. >>         highlight from the previously selected string.
  23. >>
  24. >>         Parameter   Description
  25. >>
  26. >>         wParam      Contains the index of the string that is selected.
  27. >>                     If wParam is -1, the list box is set to have no
  28. >>                     selection.
  29. >>
  30. >> SendDlgItemMessage (hYourDlgBox, nYourListBoxID, LB_SETCURSEL, -1, 0L);
  31. >>   .... [ more ]
  32. >I think that there is a bug in TPW 1.0 (my opinion only) . When I put -1 for
  33. >wparam in sendlgitemmessage I get a compiler error saying it is an invalid value
  34. >. This is using the tdialog senddlgitemmessage that doesn't require a handle to
  35. >the window to be passed. Hmm maybe its fixed in 1.5.
  36. >Samantha Lane
  37.  
  38. wParam is defined as WORD which by definition is an unsigned integer 0..65535
  39. Pascal compilers are very itchy on these things (strong type checking etc)
  40. use explicit type casting: word(-1) and the compiler will run happily...
  41. --Guy
  42.  
  43. IH8 vi
  44.