Solved

List boxes in dialog boxes

Posted on 1998-12-07
3
144 Views
Last Modified: 2010-04-16
In TPW 1.5 I need to know how to put data (ie null strings) into list boxes which are in dialog boxes made in the resource workshop. I have tried setdlgitemtext with no luck, and the addstring command is a mystery. Thanks.
0
Comment
Question by:pobwest
  • 2
3 Comments
 
LVL 27

Expert Comment

by:BigRat
Comment Utility
Hi, it's that Rat again.
The long way round is to send the control a message LB_ADDSTRING
with SendDlgItemMessage :-
    SendDlgItemMessage(hDlg,IDD_LISTBOX,LB_ADDSTRING,0,
                   LongInt(Pchar(@CharArray)));
and that for each string (which here is in CharArray). The Message is LB_ADDSTRING, the wParam is zero and the lParam is the address of the string.

The AddString method to which you refer is when you have a TListBox *object*. You can create one of these with New
in a TDialog derivitive :-
    ListBox : PListBox;
    ListBox:=New(PListBox,InitResource(@self,IDD_LISTBOX));

The InitResource constructor takes the TDialog object (here as self) and the ID of the box. You can now call the AddString method :-
    ListBox^.AddString(String);
OK? or do you want further details?
0
 

Author Comment

by:pobwest
Comment Utility
Thanks, thats what i was looking for.
0
 
LVL 27

Accepted Solution

by:
BigRat earned 50 total points
Comment Utility
Then I'll answer the other one then.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
Veeam Backup & Replication has added a new integration – Veeam Backup for Microsoft Office 365.  In this blog, we will discuss how you can benefit from Office 365 email backup with the Veeam’s new product and try to shed some light on the needs and …
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now