Hello, I have a bmp with all the icons I want in my scrollbar, I have seen in some examples that It's not necessary to use separate bmp's....
But the problem is that I don't know how to separate it, I load al the strip by default, how can I separate it and pput it in diferent items of the same imageList?????
This is the code:
ImageList *imageList1;
imageList1 = new ImageList () ;
imageList1->ImageSize = System:rawing::Size(16,16); //20
imageList1->TransparentColor = Color::White;
imageList1->Images->Add(Image::FromFile("juwelen.bmp"));
//I NEED TO DIVIDE MY BMP FILE INTO SEVERAL IMAGES IN ORDER TO FILL imaList ITEMS 1 and 2 (since I hace 3 icons in my bitmap)
ToolBar *toolBar1;
toolBar1 = new ToolBar();
ToolBarButton __gc *toolBarButton1 = new ToolBarButton();
ToolBarButton __gc *toolBarButton2 = new ToolBarButton();
ToolBarButton __gc *toolBarButton3 = new ToolBarButton();
toolBarButton1->ImageIndex = 0;
toolBarButton2->ImageIndex = 1; //item 1 doesn't exist !!!!
toolBarButton3->ImageIndex = 2; //item 2 doesn't exist !!!!
toolBar1->Buttons->Add(toolBarButton1);
toolBar1->Buttons->Add(toolBarButton2);
toolBar1->Buttons->Add(toolBarButton3);
toolBarButton1->ImageIndex = 0;
toolBarButton2->ImageIndex = 1;
toolBarButton3->ImageIndex = 2;
But the problem is that I don't know how to separate it, I load al the strip by default, how can I separate it and pput it in diferent items of the same imageList?????
This is the code:
ImageList *imageList1;
imageList1 = new ImageList () ;
imageList1->ImageSize = System:rawing::Size(16,16); //20
imageList1->TransparentColor = Color::White;
imageList1->Images->Add(Image::FromFile("juwelen.bmp"));
//I NEED TO DIVIDE MY BMP FILE INTO SEVERAL IMAGES IN ORDER TO FILL imaList ITEMS 1 and 2 (since I hace 3 icons in my bitmap)
ToolBar *toolBar1;
toolBar1 = new ToolBar();
ToolBarButton __gc *toolBarButton1 = new ToolBarButton();
ToolBarButton __gc *toolBarButton2 = new ToolBarButton();
ToolBarButton __gc *toolBarButton3 = new ToolBarButton();
toolBarButton1->ImageIndex = 0;
toolBarButton2->ImageIndex = 1; //item 1 doesn't exist !!!!
toolBarButton3->ImageIndex = 2; //item 2 doesn't exist !!!!
toolBar1->Buttons->Add(toolBarButton1);
toolBar1->Buttons->Add(toolBarButton2);
toolBar1->Buttons->Add(toolBarButton3);
toolBarButton1->ImageIndex = 0;
toolBarButton2->ImageIndex = 1;
toolBarButton3->ImageIndex = 2;