swart68

Easy way to create MarkerSymbol from Bitmap?

Discussion created by swart68 on Nov 10, 2010
Latest reply on Dec 12, 2012 by mfaulcon
I have looked high and low in all archive material and can't believe there is not a sample somewhere for creating a MarkerSymbol from a bitmap object, not a file. I get all my required point symbols for my app as bitmaps. I load these file into my resources and would like to be able to simply create a markersymbol from them.

I have looked at the CreateMarkerSymbolFromFile method in the IPictureMarkerSymbol interface and this only provides from a file. I have also looked the Picture property of IPictureMarkerSymbol which defines the use of IPictureDisp. I actually went through the effort of using this archaic technology to convert my bitmap to a IPictureDisp and when I set the Picture property I get:

Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))

I realize I can save my resource bitmap to a file and load from that file, but this seems totally unnecessary and defeats the purpose of resources.

I appreciate any pointers anyone has regarding custom symbology. Thanks, your time is greatly appreciated.

Eric

Outcomes