D1106:资源类型错误

给定的资源 [resource] 不是预期的类型。

占位符

资源

资源的地址。

 

可能的原因

接口未正确强制转换,用作方法或函数的参数。

示例

以下示例在需要 ID2D1Geometry 时传递 ID2D1SolidColorBrush。

        m_pRenderTarget->FillGeometry(
            (ID2D1Geometry*)m_pYellowGreenBrush,
            m_pYellowGreenBrush
            );

此示例生成以下调试消息:

DEBUG ERROR - The given resource[003A2C98] is not of an expected type

修复项

使用 方法所需的类型。