Board index » delphi » -*-*-*-*-*-*Using standard list boxes in BPW-*-*-*-*-*-*-

-*-*-*-*-*-*Using standard list boxes in BPW-*-*-*-*-*-*-

Does anyone know how to use list boxes in BPW?
I've seen some C source, but as Pascal does'nt have the facility of
casting, I'm a bit stuck.
My problems are (1) Which functions do I use?
                (2) How do I get an LPSTR, which otherwise seems to
                    be required?
BTW Most of my list boxes are in dialog boxes.

Thanks

#------------------------------------------------#
#  Graham Smart                 /\/\/\/\/\/\/\/\ #
#  gjsm...@ingrasys.win-uk.net  /\/\/\/\/\/\/\/\ #
#                                                #
#  "Too slow, you missed it":Anon                #
#------------------------------------------------#

 

Re:-*-*-*-*-*-*Using standard list boxes in BPW-*-*-*-*-*-*-


In article <2...@ingrasys.win-uk.net>,
   gjsm...@ingrasys.win-uk.net (Graham Smart) wrote:

Quote
>Does anyone know how to use list boxes in BPW?
>I've seen some C source, but as Pascal does'nt have the facility of
>casting, I'm a bit stuck.
>My problems are (1) Which functions do I use?
>                (2) How do I get an LPSTR, which otherwise seems to
>                    be required?
>BTW Most of my list boxes are in dialog boxes.

1) You can do most of the job with sendMessage (with messages beginning by
"lb_")
2) You only have to use strpcopy; (converts a pascal string to a pchar
(pointer to null terminated string)
For dialog boxes, you have to get the handle to the control representing the
listbox.  This is done with GetDlgItem.

Other Threads