syntax error : missing ';' before '<'

多多指教 2011-09-07 08:34:57
代码如下:
错误:syntax error : missing ';' before '<'
原工程是vs2005的,我在vc6.0下编译有误。如题所示。求指点。
#pragma once


class CListCtrl_Column_Picker : public CListCtrl
{
struct ColumnState
{
ColumnState()
:m_Visible(false)
,m_OrgWidth(0)
,m_OrgPosition(-1)
{}
bool m_Visible;
int m_OrgWidth; // Width it had before being hidden
int m_OrgPosition; // Position it had before being hidden
};
CSimpleArray<ColumnState> m_ColumnStates;//error here,提示这里错误如题
int GetColumnStateCount();
void InsertColumnState(int nCol, bool bVisible, int nOrgWidth = 0);
void DeleteColumnState(int nCol);
ColumnState& GetColumnState(int nCol);

DECLARE_MESSAGE_MAP()

virtual afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
virtual afx_msg LRESULT OnDeleteColumn(WPARAM wParam, LPARAM lParam);
virtual afx_msg LRESULT OnInsertColumn(WPARAM wParam, LPARAM lParam);
virtual afx_msg LRESULT OnSetColumnWidth(WPARAM wParam, LPARAM lParam);
virtual afx_msg BOOL OnHeaderBeginResize(UINT id, NMHDR* pNmhdr, LRESULT* pResult);
virtual afx_msg BOOL OnHeaderEndDrag(UINT id, NMHDR* pNmhdr, LRESULT* pResult);
virtual afx_msg void OnContextMenu(CWnd*, CPoint point);
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);

virtual void PreSubclassWindow();

public:
bool IsColumnVisible(int nCol);
int GetFirstVisibleColumn();
BOOL ShowColumn(int nCol, bool bShow);
BOOL SetColumnWidthAuto(int nCol = -1, bool includeHeader = false);
};
...全文
150 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
多多指教 2011-09-08
  • 打赏
  • 举报
回复
大家好。我将csimplearray扔掉了。可是又有个问题,希望各位解释下:

我在CMyListCtrl中添加了 DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam)
做一个测试,看它接收的消息,里面只有一个afxmessagebox,可以它却没有输出,即消息没有到达这里。怎么回事?
猿创日记 2011-09-08
  • 打赏
  • 举报
回复
向下兼容么?为啥还有vc6.0?那东西不好。
gold_water 2011-09-08
  • 打赏
  • 举报
回复
换一个常用类型试试,如果没有错误就明了啦
水瓶座雨夕 2011-09-08
  • 打赏
  • 举报
回复
学习@
龙行天下之Sky 2011-09-08
  • 打赏
  • 举报
回复
VC6中不一定有CSimpleArray这个类
你的代码写法木有问题
可以用CSimpleArray定义一个CString的数组
如果还是出错,说明没有CSimpleArray类或者没有相关头文件
zhd320 2011-09-07
  • 打赏
  • 举报
回复
学习了~
多多指教 2011-09-07
  • 打赏
  • 举报
回复
不清楚哦,ATL的类VC6中应该包含吧?
[Quote=引用 6 楼 heksn 的回复:]

VC6中有CSimpleArray这个吗
[/Quote]
  • 打赏
  • 举报
回复
VC6中有CSimpleArray这个吗
多多指教 2011-09-07
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 huqian2003 的回复:]

#include <atlsimpcoll.h>
试试
[/Quote]
[Quote=引用 4 楼 visualeleven 的回复:]

#include <atlsimpcoll.h>
试一下
[/Quote]

Cannot open include file: 'atlsimpcoll.h': No such file or directory
Eleven 2011-09-07
  • 打赏
  • 举报
回复
#include <atlsimpcoll.h>
试一下
huqian2003 2011-09-07
  • 打赏
  • 举报
回复
#include <atlsimpcoll.h>
试试
mynamelj 2011-09-07
  • 打赏
  • 举报
回复
应该是找不到CSimpleArray类的定义吧
多多指教 2011-09-07
  • 打赏
  • 举报
回复
up,坐等

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧