-
September 10th, 2009, 05:42 AM
#1
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
-
September 10th, 2009, 07:19 AM
#2
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.
-
September 10th, 2009, 10:53 AM
#3
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
-
September 10th, 2009, 10:57 AM
#4
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.
-
September 10th, 2009, 11:27 AM
#5
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|