请问MFC如何传递CString数组参数?
希望函数传递CString数组,可是在程序中遇到到问题
CString arrImages[100];
PrintImage(arrImages, theApp.m_nPrintMode);
BOOL WINAPI PrintImage(CString szImage[], BOOL bActual)
{
INT nValue=0,nUnit;
DOCINFO theDocInfo={sizeof(DOCINFO),_T("PrinterTarget"),NULL/*_T("C:\\a.tif")*/};
CImage theImage,theNew;
}
编译提示出错
error LNK2019: 无法解析的外部符号 "int __stdcall PrintImage(class ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > > * const,int)" (?PrintImage@@YGHQAV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@H@Z),该符号在函数 "int __cdecl PrintImageFile(void *)" (?PrintImageFile@@YAHPAX@Z) 中被引用
1>D:\BSS_ALL\Debug\BookScanStation.exe : fatal error LNK1120: 1 个无法解析的外部命令
谢谢大家了先~
CString arrImages[100];
PrintImage(arrImages, theApp.m_nPrintMode);
BOOL WINAPI PrintImage(CString szImage[], BOOL bActual)
{
INT nValue=0,nUnit;
DOCINFO theDocInfo={sizeof(DOCINFO),_T("PrinterTarget"),NULL/*_T("C:\\a.tif")*/};
CImage theImage,theNew;
}
编译提示出错
error LNK2019: 无法解析的外部符号 "int __stdcall PrintImage(class ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > > * const,int)" (?PrintImage@@YGHQAV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@H@Z),该符号在函数 "int __cdecl PrintImageFile(void *)" (?PrintImageFile@@YAHPAX@Z) 中被引用
1>D:\BSS_ALL\Debug\BookScanStation.exe : fatal error LNK1120: 1 个无法解析的外部命令
谢谢大家了先~
...全文
相关推荐
MFC编程中对话框之间参数传递的两种方法
MFC中对话框之间的参数传递的两种方法的两个实例。对MFC初学者会有很大帮助。
CString 操作指南 CString 是一种很有用的数据类型。它们很大程度上简化了MFC中的许多操作,使得MFC在做字符串操作的时候方便了很多。
CString 是一种很有用的数据类型。它们很大程度上简化了MFC中的许多操作,使得MFC在做字符串操作的时候方便了很多。不管怎样,使用CString有很多特殊的技巧,特别是对于纯C背景下走出来的程序员来说有点难以学习。这篇文章就来讨论这些技巧。
MFC的数组类CArray使用详解-赞
MFC中的数组类CArray的使用详细解析 写的很具体 条理清晰 很赞的总结帖子
在非MFC程序中引用CString
CString在当今软件设计界里还是小有名气的,说它是MFC中使用的最多的类一点也不过,然而在使用sdk编windows程序的时候,确不能利用CString类,只能用sdk的运行时库,比如strlen,strcpy,strstr等等,本文讨论的是在非mfc程序中使用CString类的方法,算是个引子,如果有更好的实现方法,欢迎大家讨论。
让VC++ MFC支持命令行参数commandline
VC++ MFC 支持 命令行参数 command line good


