Public Group

# Strange error...

This topic is 4321 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, While compiling this code:
CBaseControl *GetParentControl( void ) { return m_pParent; }
void SetParentControl( CBaseControl *pControl ) { m_pParent = pControl; }

CBaseControl *GetNextSibling( void ) { return m_pNextSibling; }    // line 80
void SetNextSibling( CBaseControl *pControl ) { m_pNextSibling = pControl; }

CBaseControl *GetPreviousSibling( void ) { return m_pPreviousSibling; }
void SetPreviousSibling( CBaseControl *pControl ) { m_pPreviousSibling = pControl; }

I get the errors:
basecontrol.h(80) : error C2059: syntax error : 'constant'
basecontrol.h(89) : error C2660: 'CBaseControl::GetWindow' : function does not take 2 arguments

As for the first error, there are no constants in (or even near) that line. As for the second, there is no GetWindow method declared or defined in the class CBaseControl, and I'm not calling such a method. I just can't figure out what's going on... Any help would be appreciated, I've been looking at this problem for hours...

##### Share on other sites
Update: While hovering my mouse over
GetNextSibling
, it seems that it is a macro definition, something like
#define GetNextSibling( HWND )...
.

I should be able to fix this now, so no worries :)

• 10
• 16
• 9
• 13
• 41