您的位置:首页 > 其它

遇到一个新问题。本问题已经解决

2015-03-26 20:56 197 查看
--------------------Configuration: QShowDib - Win32 Debug--------------------

Compiling...

QDib.cpp

d:\qshowdib\qdib.h(15) : error C2146: syntax error : missing ';' before identifier 'm_hDIB'

d:\qshowdib\qdib.h(15) : error C2501: 'HDIB' : missing storage-class or type specifiers

d:\qshowdib\qdib.h(15) : error C2501: 'm_hDIB' : missing storage-class or type specifiers

D:\QShowDib\QDib.cpp(23) : error C2065: 'm_hDIB' : undeclared identifier

D:\QShowDib\QDib.cpp(52) : error C2440: '=' : cannot convert from 'struct HDIB__ *' to 'int'

This conversion requires a reinterpret_cast, a C-style cast or function-style cast

D:\QShowDib\QDib.cpp(86) : error C2440: '=' : cannot convert from 'struct HDIB__ *' to 'int'

This conversion requires a reinterpret_cast, a C-style cast or function-style cast

QShowDib.cpp

d:\qshowdib\qdib.h(15) : error C2146: syntax error : missing ';' before identifier 'm_hDIB'

d:\qshowdib\qdib.h(15) : error C2501: 'HDIB' : missing storage-class or type specifiers

d:\qshowdib\qdib.h(15) : error C2501: 'm_hDIB' : missing storage-class or type specifiers

QShowDibDoc.cpp

d:\qshowdib\qdib.h(15) : error C2146: syntax error : missing ';' before identifier 'm_hDIB'

d:\qshowdib\qdib.h(15) : error C2501: 'HDIB' : missing storage-class or type specifiers

d:\qshowdib\qdib.h(15) : error C2501: 'm_hDIB' : missing storage-class or type specifiers

QShowDibView.cpp

d:\qshowdib\qdib.h(15) : error C2146: syntax error : missing ';' before identifier 'm_hDIB'

d:\qshowdib\qdib.h(15) : error C2501: 'HDIB' : missing storage-class or type specifiers

d:\qshowdib\qdib.h(15) : error C2501: 'm_hDIB' : missing storage-class or type specifiers

Generating Code...

执行 cl.exe 时出错.

出错地点:

#if !defined(AFX_QDIB_H__506061F8_7436_435B_B817_94C7814FB87F__INCLUDED_)

#define AFX_QDIB_H__506061F8_7436_435B_B817_94C7814FB87F__INCLUDED_

#if _MSC_VER > 1000

#pragma once

#endif // _MSC_VER > 1000

class QDib

{

protected:

HDIB m_hDIB;

CPalette * m_palDIB;


public:

QDib();

virtual ~QDib();

BOOL Load(LPCTSTR lpszFileName);

BOOL LoadFromResource(UINT nID);

CPalette * GetPalette();

BOOL Show(CDC *pDC,int x,int y,int cx=0,int cy=0);

int Width();

int Height();

void DeleteDIB();

};

#endif // !defined(AFX_QDIB_H__506061F8_7436_435B_B817_94C7814FB87F__INCLUDED_)

QShowDib.exe - 1 error(s), 0 warning(s)

本问题已解决:

在QDib.h头部加上头文件

#include"dibapi.h"
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐