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

--------------------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"

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值