Results 1 to 2 of 2

Thread: mimic vb's control array for loading images

  1. #1

    Thread Starter
    Frenzied Member ae_jester's Avatar
    Join Date
    Jun 2001
    Location
    Kitchener Ontario Canada Earth
    Posts
    1,545

    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:
    1. Dim i As Integer
    2. For i = 0 To 31
    3.     If posarr(i) = 1 Then
    4.         'Load a black piece
    5.         sqr(i).Picture = LoadPicture("C:\blackpiece.bmp")
    6.     Else
    7.         'Load a white piece
    8.         sqr(i).Picture = LoadPicture("C:\whitepiece.bmp")
    9.     End If
    10. next i
    I'm a newbie, how can I do this in C++?

    Thanx for any help.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    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
  •  



Click Here to Expand Forum to Full Width