m_pFont是控件的字体属性
在OnDraw中:
//设置文本字体
IFont* pIFont;
//
m_pFont->QueryInterface(IID_IFont, reinterpret_cast<void**>(&pIFont));
这段程序有什么错误?
为什么报错Exception:p != 0?
我初学com,请指教,尽量详细点阿!
在OnDraw中:
//设置文本字体
IFont* pIFont;
//
m_pFont->QueryInterface(IID_IFont, reinterpret_cast<void**>(&pIFont));
这段程序有什么错误?
为什么报错Exception:p != 0?
我初学com,请指教,尽量详细点阿!
Exception:p != 0?这句话是不是提示你 m_pFont.p是个空指针?
m_pFont->QueryInterface(IID_IFont, &pIFont);
呢?just try.
CComPtr<IFontDisp> m_pFont;
m_pFont.p是?
我初学,不太懂
0160798A mov dword ptr [ebp-30h],0 /////////1
134: //
135: m_pFont->QueryInterface(IID_IFont,
136: reinterpret_cast<void**>(&pIFont));
01607991 mov esi,esp /////////2程序在1位置时pIFong = 0xcccccccc
到了2位置变为了0x00000000这段是在OnDraw里面的,是不是pIFont 初始化失败了?
为什么到了2那成了0x00000000?
我不懂