Loads an image from the resources embedded in a .dll or .exe file and assigns it to the box' Picture.
VB6
![]() |
---|
Public Sub LoadPicFromRes( _ |
C++
![]() |
---|
public: |
Loads an image from a resource in the box. Note that standard resource icons and bitmaps are not supported. You should insert your pictures as custom resources, either by pasting the binary contents of the image file into the resource binary code, or by addressing it through the resource script.
Following syntax in the .RC file makes the latter:
![]() |
---|
RESNAME TYPENAME "path to file" |
The image can be loaded in the box that way:
![]() |
---|
fc.LoadPicFromRsc((ULONG)AfxGetResourceHandle(), RESNAME, TYPENAME) |
Check the PicFromRes sample to see how Windows resources can be accessed from VB.