mimic vb's control array for loading images
Hi,
I'm using Borland C++ Builder 6.0 and I have a form with 32 images (sqr01, sqr02, sqr03 etc). I also have an array with 32 numbers in it. I need to loop through this array, check the value, and then load an image into the appropriate square based on that value.
In VB I can do this using control arrays...
VB Code:
Dim i As Integer
For i = 0 To 31
If posarr(i) = 1 Then
'Load a black piece
sqr(i).Picture = LoadPicture("C:\blackpiece.bmp")
Else
'Load a white piece
sqr(i).Picture = LoadPicture("C:\whitepiece.bmp")
End If
next i
I'm a newbie, how can I do this in C++?
Thanx for any help.