locked
Displaying a picture in a box on a dialog in VC++ .NET2010 RRS feed

  • Question

  • I need to display a picture on a dialog in VC++ Win32 app in .NET2010.  I've tried dropping a picture control from the Toolbox onto the dialog in teh resource editor but can not find a way to specify a bitmap from the resource list (or any other way).  I can't seem to find documentation for the picture box relating to .NET 2010.  How do I link / display a static picture (bitmap or otherwise) to an area of a CDialog?  I can't believe this to be difficult but I can't seem to find a way to accomplish this.

    Thanks in advance

    Nathan

    Tuesday, October 29, 2013 8:52 PM

Answers

  • Thanks so much.  The Type property setting was what I was missing. The image setting was logged / disabled before.  Once I had that set to Bitmap the rest fell into place.

    Nathan

    • Marked as answer by nsmith17044 Thursday, October 31, 2013 12:30 PM
    Thursday, October 31, 2013 12:27 PM

All replies

  • First import the bitmap file into your project resources. (Right click on the .rc file in the Resource View, select Add Resource.) Now you have a bitmap file and it has an ID like IDB_BITMAP1.

    Then select the picture control in the resource editor and right-click and select Properties. The 'Type' property should be set to Bitmap and the 'Image' property should be set to the ID of the bitmap.

    • Proposed as answer by glotter Wednesday, October 30, 2013 7:53 AM
    Wednesday, October 30, 2013 3:00 AM
  • Thanks so much.  The Type property setting was what I was missing. The image setting was logged / disabled before.  Once I had that set to Bitmap the rest fell into place.

    Nathan

    • Marked as answer by nsmith17044 Thursday, October 31, 2013 12:30 PM
    Thursday, October 31, 2013 12:27 PM