home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!chx400!bernina!guy
- From: guy@st.ife.ethz.ch (Guy Morbach)
- Subject: Re: Greying buttons, listbox items etc.
- Message-ID: <guy.713622809@ife0>
- Sender: news@bernina.ethz.ch (USENET News System)
- Organization: Swiss Federal Institute of Technology (ETH), Zurich, CH
- 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>
- Date: Wed, 12 Aug 1992 12:33:29 GMT
- Lines: 32
-
- che358w@vaxc.cc.monash.edu.au writes:
-
- >>
- >> To unselect everything, try sending this message to your list box with
- >> wParam equal to -1:
- >>
- >> LB_SETCURSEL
- >>
- >> This message selects a string and scrolls it into view, if
- >> necessary. When the new string is selected, the list box removes the
- >> highlight from the previously selected string.
- >>
- >> Parameter Description
- >>
- >> wParam Contains the index of the string that is selected.
- >> If wParam is -1, the list box is set to have no
- >> selection.
- >>
- >> SendDlgItemMessage (hYourDlgBox, nYourListBoxID, LB_SETCURSEL, -1, 0L);
- >> .... [ more ]
- >I think that there is a bug in TPW 1.0 (my opinion only) . When I put -1 for
- >wparam in sendlgitemmessage I get a compiler error saying it is an invalid value
- >. This is using the tdialog senddlgitemmessage that doesn't require a handle to
- >the window to be passed. Hmm maybe its fixed in 1.5.
- >Samantha Lane
-
- wParam is defined as WORD which by definition is an unsigned integer 0..65535
- Pascal compilers are very itchy on these things (strong type checking etc)
- use explicit type casting: word(-1) and the compiler will run happily...
- --Guy
-
- IH8 vi
-