请教:为什么加了包括了一个.h文件后,MessageBox就不让用了?分有的是,随便加!
问题如下:
后加入的dpl.h文件如下:
#ifndef DPL_TYPES_H
#define DPL_TYPES_H
/**
* @ Darwin Programming Library
*/
#include "dpl.h"
#ifdef __cplusplus
extern "C"{
#endif
typedef unsigned char dpl_uint8_t;
typedef unsigned short dpl_uint16_t;
typedef unsigned int dpl_uint32_t;
typedef signed char dpl_int8_t;
typedef signed short dpl_int16_t;
typedef signed int dpl_int32_t;
#ifdef _WIN32
typedef _int64 dpl_int64_t;
#else
typedef long long dpl_int64_t;
#endif
typedef unsigned int dpl_size_t;
typedef int dpl_second_t;
typedef dpl_uint16_t dpl_port_t;
typedef dpl_uint16_t dpl_wchar_t;
#ifdef __cplusplus
}
#endif
#endif
//dpl.h文件结束
stdafx.h 如下:
#include <stdio.h>
#include "dpl.h"// 没有这个语句,就没有问题
#using <mscorlib.dll>
#using <System.dll>
#using <System.Xml.dll>
#using <System.Windows.Forms.dll>
#using <System.Drawing.dll>
#using <System.Data.dll>
#include <tchar.h>
using namespace System;
using namespace System::Xml;
using namespace System::ComponentModel;
using namespace System::Windows::Forms;
using namespace System::Drawing;
using namespace System::IO;
using namespace System::Data;
using namespace System::Data::SqlClient;
using namespace System::Collections;
using namespace System::Windows;
using namespace System::Windows::Forms;
当一用下面的语句:
System::Windows::Forms::MessageBox("SS");
就出现如下提示:
编译时提示:e:\VC\count\SmsForm.cpp(213): error C2039: “MessageBoxA” : 不是“System::Windows::Forms”的成员
要是在stdafx.h中去掉#include "dpl.h,MessageBox函数就可正常使用?
何故?请教了。谢谢。
还有一万多分呢,愿与网友分享!