Click here to Skip to main content
15,911,711 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generallistview problem Pin
Amit Dey19-Mar-03 13:16
Amit Dey19-Mar-03 13:16 
GeneralRe: listview problem Pin
Michael Dunn19-Mar-03 15:48
sitebuilderMichael Dunn19-Mar-03 15:48 
GeneralRe: listview problem Pin
Amit Dey20-Mar-03 11:11
Amit Dey20-Mar-03 11:11 
GeneralStrange dll Problem Pin
Anders Molin19-Mar-03 13:14
professionalAnders Molin19-Mar-03 13:14 
GeneralAdd network printer Pin
Anonymous19-Mar-03 12:00
Anonymous19-Mar-03 12:00 
GeneralRe: Add network printer Pin
Brian Shifrin19-Mar-03 13:58
Brian Shifrin19-Mar-03 13:58 
GeneralDIB Engine limitation Pin
Tony Teveris19-Mar-03 11:10
Tony Teveris19-Mar-03 11:10 
QuestionAre there inheritance issues with static members? Pin
adonisv19-Mar-03 10:56
adonisv19-Mar-03 10:56 
I've got my declaration of canal tree which has a static array of ID's of icons. I then derive another tree control class from canal tree called RPhysicalTree. I then derive andother class from RPhysicalTree called SacmanSetUpTree. When I compile, I keep getting a linker error. I've delcared and defined the array correctly. What's up? Confused | :confused:


--------------------Configuration: SacmanSetupProgram - Win32 Debug--------------------
Compiling...
RCanalTree.cpp
d:\data\vss\coderesearch\sacmansetupprogram\debug\msado15.tlh(409) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
Generating Code...
Skipping... (no relevant changes detected)
rphysicaltree.cpp
RSacmanSetupTree.cpp
Linking...
rphysicaltree.obj : error LNK2005: "public: static int * RCanalTree::m_icons" (?m_icons@RCanalTree@@2PAHA) already defined in RCanalTree.obj
RSacmanSetupTree.obj : error LNK2005: "public: static int * RCanalTree::m_icons" (?m_icons@RCanalTree@@2PAHA) already defined in RCanalTree.obj
Debug/SacmanSetupProgram.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
SacmanSetupProgram.exe - 3 error(s), 1 warning(s)
Cry | :((


#if !defined(AFX_RCANALTREE_H__18E8CD78_FD89_45EE_B60E_E483A7A4520A__INCLUDED_)<br />
#define AFX_RCANALTREE_H__18E8CD78_FD89_45EE_B60E_E483A7A4520A__INCLUDED_<br />
<br />
#if _MSC_VER > 1000<br />
#pragma once<br />
#endif // _MSC_VER > 1000<br />
// RCanalTree.h : header file<br />
//<br />
#include "resource.h"<br />
#include "CanalManager.h"<br />
<br />
enum EnumTreeItems { TI_NONE,TI_SYSTEM,TI_SEGMENT,TI_SITE,TI_CANAL,TI_TURNOUT,<br />
	TI_PUMP,TI_WELL,TI_ORDER_FOR_PUMP,TI_ORDER_FOR_TURNOUT,TI_ORDER_FOR_WELL,<br />
	TI_AUTOMATIC_CONTROL,TI_CENTRAL_CONTROL,TI_CENTRAL_FLOW,TI_LOCAL_FLOW,<br />
	TI_LOCAL_LEVEL,TI_MANUAL_CONTROL,TI_CONTROLLERS,TI_SSFC,TI_MC_SITE,<br />
	TI_CV_SITE,TI_LLC_SITE,TI_LFC_SITE,TI_SCHEDULING};<br />
<br />
enum EnumForOnCheck { CHECK_OKAY, CHECK_IGNORED, CHECK_REPOPULATE };<br />
<br />
/////////////////////////////////////////////////////////////////////////////<br />
// RCanalTree window<br />
<br />
class RCanalTree : public CTreeCtrl<br />
{<br />
// Construction<br />
public:<br />
	RCanalTree(CCanalManager *pCanMan=NULL);<br />
<br />
// Attributes<br />
public:<br />
	const CCanalManager* GetCanalManagerPointer() { return m_pCanMan; }<br />
	void SetCanalManagerPointer(CCanalManager *pCanMan) { m_pCanMan=pCanMan; }<br />
<br />
// Operations<br />
public:<br />
	virtual void Populate();<br />
	int DeleteChildren(HTREEITEM hParent);<br />
	static int m_icons[];<br />
	HTREEITEM GetDepthNextItem(HTREEITEM hItem);<br />
	HTREEITEM FindItem(const char *name, int dwData);<br />
	HTREEITEM InsertChildItem(const char *name, int dImage, HTREEITEM hParent, DWORD data, int iCheck=-1, bool bCondition=true);<br />
<br />
// Overrides<br />
	// ClassWizard generated virtual function overrides<br />
	//{{AFX_VIRTUAL(RCanalTree)<br />
	//}}AFX_VIRTUAL<br />
<br />
// Implementation<br />
public:<br />
	int GetIconIndex(int idOfIcon);<br />
	int GetImageIndexFor(int idOfIcon);<br />
	bool DeleteChildItem(HTREEITEM hParent, const char* name, DWORD data);<br />
	virtual void UpdateImages();<br />
	virtual EnumForOnCheck OnCheck(HTREEITEM hItem, bool bNowChecked);<br />
	virtual ~RCanalTree();<br />
<br />
	// Generated message map functions<br />
protected:<br />
	bool IsScheduleLocked();<br />
	CCanalManager* m_pCanMan;<br />
	//{{AFX_MSG(RCanalTree)<br />
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);<br />
	//}}AFX_MSG<br />
<br />
	DECLARE_MESSAGE_MAP()<br />
};<br />
<br />
/////////////////////////////////////////////////////////////////////////////<br />
<br />
int RCanalTree::m_icons[] = {	<br />
	IDI_ICON_SYSTEM,			<br />
	IDI_ICON_CANAL,				<br />
	IDI_ICON_SITE,				<br />
	IDI_ICON_WELL,				<br />
	IDI_ICON_TURNOUT,			<br />
	IDI_ICON_PUMP,			<br />
	0 // NULL place holder used to terminate the array.<br />
};<br />
<br />
//{{AFX_INSERT_LOCATION}}<br />
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.<br />
<br />
<br />
<br />
#endif // !defined(AFX_RCANALTREE_H__18E8CD78_FD89_45EE_B60E_E483A7A4520A__INCLUDED_)
Eek! | :eek:
AnswerRe: Are there inheritance issues with static members? Pin
Michael Dunn19-Mar-03 11:13
sitebuilderMichael Dunn19-Mar-03 11:13 
GeneralYou Dah Maaaaaaan! Pin
adonisv19-Mar-03 11:33
adonisv19-Mar-03 11:33 
GeneralActivex-programming....multi choice... Pin
ZarrinPour19-Mar-03 10:46
ZarrinPour19-Mar-03 10:46 
GeneralRe: Activex-programming....multi choice... Pin
Brian Shifrin19-Mar-03 11:03
Brian Shifrin19-Mar-03 11:03 
Generalpassing pointers from DLL to VB to DLL Pin
IGeorgeI19-Mar-03 10:32
IGeorgeI19-Mar-03 10:32 
GeneralRe: passing pointers from DLL to VB to DLL Pin
FlorianS19-Mar-03 10:46
FlorianS19-Mar-03 10:46 
GeneralRe: passing pointers from DLL to VB to DLL Pin
IGeorgeI19-Mar-03 11:37
IGeorgeI19-Mar-03 11:37 
GeneralNTService and Hooks Pin
FlorianS19-Mar-03 9:30
FlorianS19-Mar-03 9:30 
GeneralRe: NTService and Hooks Pin
Joan M20-Mar-03 4:58
professionalJoan M20-Mar-03 4:58 
QuestionLoading bitmaps? Pin
clintsinger19-Mar-03 9:16
clintsinger19-Mar-03 9:16 
AnswerRe: Loading bitmaps? Pin
Chris Losinger19-Mar-03 9:27
professionalChris Losinger19-Mar-03 9:27 
GeneralRe: Loading bitmaps? Pin
clintsinger19-Mar-03 9:43
clintsinger19-Mar-03 9:43 
GeneralRe: Loading bitmaps? Pin
Chris Losinger19-Mar-03 10:57
professionalChris Losinger19-Mar-03 10:57 
QuestionHow get the path of Internet Explorer (executable) or any APP.EXE ?? Pin
Cris19-Mar-03 9:12
Cris19-Mar-03 9:12 
AnswerRe: How get the path of Internet Explorer (executable) or any APP.EXE ?? Pin
Amit Dey19-Mar-03 13:19
Amit Dey19-Mar-03 13:19 
AnswerRe: How get the path of Internet Explorer (executable) or any APP.EXE ?? Pin
Big Art20-Mar-03 6:27
Big Art20-Mar-03 6:27 
GeneralRe: How get the path of Internet Explorer (executable) or any APP.EXE ?? Pin
Cris20-Mar-03 7:07
Cris20-Mar-03 7:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.