|Handle as Variant||
The Handle parameter could be:
The control provides an image list window, that's displayed at design time. Use the ShowImageList property to hide the image list window, at design time. At design time, the user can add new icons to the control's Images collection, by dragging icon files, exe files, etc, to the images list window. At runtime, the user can use the Images and ReplaceIcon method to change the Images collection. The Images collection is 1 based. Use the CellImage, CellImages properties to assign icons to a cell. Use the CellPicture property to load a picture in a cell.
The following VB sample adds two icons to the control's images collection using the BASE64 encoding strings:
The following template adds two icons to the control's images collection using the BASE64 encoding strings:
The following VB sample shows how to replace the entire list of icons, using a Microsoft Image List control ( ImageList1 ):
The control copies the images list, so destroying the source of the images list should not affect the images in the control.
The following C++ sample loads icons from a BASE64 encoded string:
The following C++ sample loads icon from a HIMAGELIST type:
SHFILEINFO sfi; ZeroMemory( &sfi, sizeof(sfi) ); HIMAGELIST hSysImageList = (HIMAGELIST)SHGetFileInfo(_T("C:\\"), 0, &sfi, sizeof (SHFILEINFO), SHGFI_SMALLICON | SHGFI_SYSICONINDEX ); m_grid.Images( _variant_t( (long)hSysImageList ) );
The following VB.NET sample loads icons from a BASE64 encoded string:
The following C# sample loads icons from a BASE64 encoded string:
The following VFP sample loads icons from a BASE64 encoded string: