CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2000
    Location
    CA, USA
    Posts
    88

    Loading an image from an Imagelist for a MSHFlexGrid

    Hello all,

    Right now I am loading an image into a MSHFlexGrid control using the CellPicture method.

    Example
    .CellPicture = LoadPicture(App.Path & "\Check.gif")

    I would like to bind an ImageList to the MSHFlexGrid control just as you can with a Coolbar or Toolbar etc... I figured out how to bind the ImageList to the MSHFlexGrid control yet. Is there a way to do it? Basically, I don't want to include any unnecessary files with my exe file. I would like to have everything that is need built into the exe file. Is there a way to do this so I don't have to use the LoadImage function? Thanks

    Mark


  2. #2
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: Loading an image from an Imagelist for a MSHFlexGrid

    If nothing else, you can load your images into a Resource file and use the LoadResPicture Function like this

    set MSHFlexGrid1.CellPicture = LoadResPicture("UPARROW", vbResBitmap)



    Using a Resource file will include your images as part of the executable.
    The Resource Editor can be accessed by using Addin Manager and loading the Resource editor then Click TOOLS/ Resource editor to add images

    John G

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured