首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

error C2660: “D3DXCreateFont”: 函数不接受 12 个参数解决思路

2013-12-15 
error C2660: “D3DXCreateFont”: 函数不接受 12 个参数使用vs2008+Direct9.0cD3DXCreateFont(m_pDevice,he

error C2660: “D3DXCreateFont”: 函数不接受 12 个参数
使用vs2008+Direct9.0c
D3DXCreateFont(m_pDevice,height,width,1000,0,FALSE,GB2312_CHARSET,
OUT_TT_ONLY_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH,"宋体",&m_pFont);
m_pFont->DrawText(NULL,strtext,-1,&rect,Format,m_Color);
出现error C2660: “D3DXCreateFont”: 函数不接受 12 个参数
error C2660: “ID3DXFont::DrawTextA”: 函数不接受 6 个参数
[解决办法]
HRESULT D3DXCreateFont(
  _In_   LPDIRECT3DDEVICE9 pDevice,
  _In_   INT Height,
  _In_   UINT Width,
  _In_   UINT Weight,
  _In_   UINT MipLevels,
  _In_   BOOL Italic,
  _In_   DWORD CharSet,
  _In_   DWORD OutputPrecision,
  _In_   DWORD Quality,
  _In_   DWORD PitchAndFamily,
  _In_   LPCTSTR pFacename,
  _Out_  LPD3DXFONT *ppFont
);

你使用F12跳转到函数定义处,看一下调用函数的参数和你传入的有什么不同。
[解决办法]
重新安装Direct9.0c ?

热点排行