ATL 9.0 bug or Excel 2010 bug?
"dennisyjiang" <[email protected]>
| Newsgroups | gmane.comp.windows.wtl |
|---|---|
| Message-ID | <[email protected]> |
Hi Everyone,
I am using ATL with Visual Studio 2008 to develop an addin for Excel. The addin works for all other Excel versions except for Excel 2010. Here is the code:
BEGIN_PROP_MAP(CGraphCtl)
PROP_DATA_ENTRY("_cx", m_sizeExtent.cx, VT_UI4)
PROP_DATA_ENTRY("_cy", m_sizeExtent.cy, VT_UI4)
PROP_ENTRY_TYPE("Appearance", DISPID_APPEARANCE, CLSID_NULL, VT_I4)
PROP_ENTRY_TYPE("BackColor", DISPID_BACKCOLOR, CLSID_StockColorPage, VT_I4)
PROP_ENTRY_TYPE("BorderStyle", DISPID_BORDERSTYLE, CLSID_NULL, VT_I4)
PROP_ENTRY_TYPE("BorderVisible", DISPID_BORDERVISIBLE, CLSID_NULL, VT_BOOL)
PROP_ENTRY_TYPE("Caption", DISPID_CAPTION, CLSID_NULL, VT_BSTR)
PROP_ENTRY_TYPE("Font", DISPID_FONT, CLSID_StockFontPage, VT_FONT)
PROP_ENTRY_TYPE("TrackMode", 5, CLSID_NULL, VT_I2)
END_PROP_MAP()
The failure is on loading "Font" property when OleLoadFromStream is called by ATL which returns E_FAIL. Saving the font using OleSaveToStream works. Note that this failure only happen on Excel 2010. Excel 2003 and 2007 works fine.
Any clue to this issue is greatly appreciated.
-Thanks,
Dan
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/wtl/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/wtl/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/