|
-
Feb 21st, 2003, 04:55 PM
#1
Thread Starter
Frenzied Member
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.
-
Feb 22nd, 2003, 08:42 AM
#2
It's not about C++, it's about Borland C++ Builder. Sorry, nearly no one here uses that.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|