Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Array of HBITMAP

Status
Not open for further replies.

iceice

Programmer
Joined
Feb 9, 2006
Messages
6
Location
GB
Is it possible to create an array of HBITMAP and then cycle through the array

I've tried HBITMAP *bitmaps

won't work

Thanks
 
Did you try
HBITMAP bitmaps[10];

--
 
Thanks.

It has caused an error elsewhere in the program

I have a constructor which begins as follows

TWin(HWND _hwnd,int _id) : hwnd(_hwnd),id(_id), bBack(0),bSpr(0),hClip(0),bitmaps(0)
{

bitmaps(0) is throwing an error

file.cpp(155) : error C2536: 'TWin::bitmaps' : cannot specify explicit initializer for arrays

How can I fix this?



 
How about trying
bitmaps[0](0)
To initialise the first element of the array.

If you want to initialise all the elements of the array, then I suggest a loop inside the body of the constructor.




--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top