MFC view class Error: Intellisense:declaration is incompatible with ... Solution Solutions

Source: Internet
Author: User

The basic situation is that I wrote a class myself:

Class Cdib

{。。。。 }

Then in the MFC auto-generated "project name Dlg.cpp" Using Class Cdib, my project name is mfcpictureprocessing, so the class is class Cmfcpictureprocessingdlg, the following is the view class. h file:

Class Cmfcpictureprocessingdlg:public CDialogEx

{

。。。

Cdib *dlgdib;

cpalette* Createbitmappalette (Cdib *pbitmap);

。。。

}

It is then implemented in. CPP specifically:

cpalette* Cmfcpictureprocessingdlg::createbitmappalette (cdib* pbitmap)

{

。。。。

Dlgdib ....

}

The problem arises at this time:

Intellisense:declaration is incompatible with "CPalette *cmfcpictureprocessingdlg::createbitmappalette (< Error-type> *pbitmap) "(declared at line of" e:\visual_studio_workplace\mfcpictureprocessing\ Mfcpictureprocessing\mfcpictureprocessingdlg.h ") Error c2061:syntax error:identifier ' Cdib ' E:\visual_studio_ Workplace\mfcpictureprocessing\mfcpictureprocessing\mfcpictureprocessingdlg.h, wait a lot of nonsense. More than 10 solutions are in the "project name Dlg.h" Add a sentence: Class Cdib, so that when you try to include this class in the class file, and then use it, there will be no problem. Summary: The general class has not yet seen the problem, only in the MFC view class using their own defined classes will appear, whether as parameters of the function, or separate instantiation will have a problem, plus this sentence mandatory declaration there is no problem ~ But this problem I have a day to understand the Reference link:/http bbs.csdn.net/topics/391942352 solved the later only to understand this last

MFC view class Error: Intellisense:declaration is incompatible with ... Solution Solutions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.