错误信息如下,我认为应该是函数返回值的问题
--------------------Configuration: ListView - Win32 Debug--------------------
Linking...
ListViewView.obj : error LNK2001: unresolved external symbol "public: void __thiscall CListViewView::SetCtrlStyle(struct HWND__ *,unsigned long)" (?SetCtrlStyle@CListViewView@@QAEXPAUHWND__@@K@Z)
Debug/ListView.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.关于函数的代码如下
————————————————分割线——————————————————
void CListView::OnViewChange()
{
// TODO: Add your command handler code here
static int nStyleIndex=1;
DWORD style[4]={LVS_REPORT,LVS_ICON,LVS_SMALLICON,LVS_LIST};
CListCtrl& m_ListCtrl=GetListCtrl();
SetCtrlStyle[/color[color=#FF0000]](m_ListCtrl.GetSafeHwnd(),style[nStyleIndex]);
nStyleIndex++;
if(nStyleIndex>3)nStyleIndex=0;
}
--------------------Configuration: ListView - Win32 Debug--------------------
Linking...
ListViewView.obj : error LNK2001: unresolved external symbol "public: void __thiscall CListViewView::SetCtrlStyle(struct HWND__ *,unsigned long)" (?SetCtrlStyle@CListViewView@@QAEXPAUHWND__@@K@Z)
Debug/ListView.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.关于函数的代码如下
————————————————分割线——————————————————
void CListView::OnViewChange()
{
// TODO: Add your command handler code here
static int nStyleIndex=1;
DWORD style[4]={LVS_REPORT,LVS_ICON,LVS_SMALLICON,LVS_LIST};
CListCtrl& m_ListCtrl=GetListCtrl();
SetCtrlStyle[/color[color=#FF0000]](m_ListCtrl.GetSafeHwnd(),style[nStyleIndex]);
nStyleIndex++;
if(nStyleIndex>3)nStyleIndex=0;
}
http://blog.csdn.net/DavidHsing/archive/2008/03/08/2158703.aspx
无奈