Toolbar and Image control 
Author Message
 Toolbar and Image control

Hi,

In my VC5.0 program I can't ad an Image to a Toolbar Control. Both not in de
resource editor and in the application it self. When I dynamically add an
Image using SetImageList
the app gives "Invalid Object". When I add an Image to a specific button it
says "ImageList must be initialized before it can be used".
In VB it works fine.

Why will this not work?
How initialize an imagelist?
What is the difference using these control form VC and VB?

Thanks

Piet Vredeveld



Tue, 01 Aug 2000 03:00:00 GMT  
 Toolbar and Image control

Besides adding the toolbar control in your form, you also need to add an
ImageList control in your form.  After you add all the icons in the
imagelist control, you can set the imagelist property point to the
imagelist control.  
And then, each button in the toolbar has a property 'image'.  You set the
image value correspond to the image number you set in the imagelist
control.
After that, you can see the icon in the tool bar.



Quote:
> Hi,

> In my VC5.0 program I can't ad an Image to a Toolbar Control. Both not in
de
> resource editor and in the application it self. When I dynamically add an
> Image using SetImageList
> the app gives "Invalid Object". When I add an Image to a specific button
it
> says "ImageList must be initialized before it can be used".
> In VB it works fine.

> Why will this not work?
> How initialize an imagelist?
> What is the difference using these control form VC and VB?

> Thanks

> Piet Vredeveld




Wed, 09 Aug 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Image\Toolbar Editor Question

2. change the image of toolbar botton(GUI in visual c++ 6)

3. Toolbar Button Images

4. Animated Image on Toolbar

5. Resource Editor - Toolbar Images

6. 24bit images in toolbars

7. 256 color images on toolbar buttons

8. ToolBar Image

9. ToolBar image

10. Repost: MFC toolbar with system defined images

11. set images on toolbar button

12. How can i create IE sytle toolbar( with text+image)

 

 
Powered by phpBB® Forum Software