CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 1999
    Location
    Salisburyl UK
    Posts
    324

    Beginner Question about array of CStatics

    Hi All..

    I want to create a grid/table of CStatic text boxes. The size of the grid will be user defined.
    Having created the text boxes I want to draw them on a dialog window.
    I think I should use a CObArray of CStatic pointers.
    I would then like to access any of the boxes using X,Y co-ordinates, so that I can assign numbers to the boxes. Im trying to create something to help my daughter learn her times tables !

    Id be greatfull if anyone could show me the best way of doing this. Im afraid my programming skills are a little rusty !
    Im using VC6.

    Many thanks for your time!

    Cheers
    Phill

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Beginner Question about array of CStatics

    I'm not following the x y coordinates part.

    An array of CStatic pointers sounds reasonable given my limited understanding of your requirements. I can't help wondering if a List Control would be an easier solution though.

  3. #3
    Join Date
    Sep 1999
    Location
    Salisburyl UK
    Posts
    324

    Re: Beginner Question about array of CStatics

    Hi..
    Thanks for the reply....

    I thought the X,Y thing would be a way of accessing my array as if it was a table. i.e GetAtTable(5,4) would return me the number at the 5th column and 4th row even though the array is a single dimension.
    Maybe Im making this harder than it should be !

    Thanks
    Phill

  4. #4
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Beginner Question about array of CStatics

    I thought you meant screen coordinates. You could make it a two dimensional array. That probably would be convenient.

  5. #5
    Join Date
    Sep 1999
    Location
    Salisburyl UK
    Posts
    324

    Re: Beginner Question about array of CStatics

    yes... your probibly right

    Can you tell me how I would declare, fill and create a 2d array of CStatic pointers please?

    Thanks again
    Phill

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

Featured