Accessing selected text from a list box within a Simple Dialog Box

Accessing selected text from a list box within a Simple Dialog Box

Post by Kevi » Wed, 19 Jan 2000 04:00:00



Hi, I'm a new user of Rational Visual Test 6. I'm experiencing difficulty in
accessing selected text from a list box once the dialog box has been
released by pressing "OK" for example.The structure associated with the
dialog box is as follows:
type  IDD_SIMPLE
        ID as simple
        Proc as dlgproc
        X as long
        Y as long
        CX as long
        CY as long
        Caption as string
        IDC_TCLIST as array of string
end type

An example of the code associated with the dialog box in my *.mst file :

'*** START ***

dim myDialog as IDD_simple
dim Partitions(3) as string
dim enumcounter as integer = 0
dim retVal as integer
dim selectStr as string

'Initialising Partition array from structure - EnumResources
for iLoop = 1 to 3
    EnumResources(huser, bitFilter, lpHandle, cRequestedData,
lpcReturnedData, lpResourceEnumInfo )
    Partitions(enumcounter) = UNICODEtoASCII(RESOURCE_ENUM_INFO1.szName)
next

MyDialog.ID = IDD_SIMPLE
MyDialog.Caption = "Simple Example"
MyDialog.IDC_TCLIST = Partitions

retVal = Dialog(MyDialog)
msgBox retVal
selectStr = ''HERE I'M LOOKING TO ASSIGN THE SELECTED STRING STORED IN
MyDialog.IDC_TCLIST
                AFTER HAVING PRESSED "OK" TO RELEASE THE DAILOG BOX.

'*** end ***
What do I do, do I need a handle to the list box whithin the dialog box?

Your help will be greatly appreciated.
 Thanks, Kevin