Wiki System

06/08/2018 14:30 khemomo#1
I need a help while adding Wiki System I got an error regarding to CWndComboBox

here's my error

Error C2039 'GetSelectedItemData': is not a member of 'CWndComboBox'

Error line in WndWiki.cpp
Code:
void CWndWiki::UpdateList()
{
	const static DWORD dwItems [] = { II_SYS_SYS_SCR_PERIN };
	DWORD dwJob = m_pComboJob->GetSelectedItemData();
	DWORD dwFilter = m_pComboKind->GetSelectedItemData();
	CString strFilter = m_pEditFilter->GetString();
#Closerequest thanks :)
06/08/2018 14:55 nicksss03#2
Search the “CWndComboBox” and make the GetSelecledItenData be on the group. Or in the code.
06/08/2018 15:14 khemomo#3
Quote:
Originally Posted by nicksss03 View Post
Search the “CWndComboBox” and make the GetSelecledItenData be on the group. Or in the code.
I tried to search "GetSelectedItemData" in the file we're i copied the wiki I got the same input of "GetSelectedItemData" in my source.

And i think its being added base on this code but it is being define inside the improve map system

Code:
#ifdef __IMPROVE_MAP_SYSTEM
DWORD CWndComboBox::GetSelectedItemData( void ) const
{
	int nSelectedListNumber = m_wndListBox.GetCurSel();
	if( nSelectedListNumber == -1 )
	{
		return 0;
	}
	return m_wndListBox.GetItemData( nSelectedListNumber );
}
void CWndComboBox::GetListBoxText( int nIndex, CString& strString ) const
{
	m_wndListBox.GetText( nIndex, strString );
}
int CWndComboBox::GetListBoxTextLength( int nIndex ) const
{
	return m_wndListBox.GetTextLen( nIndex );
}
int CWndComboBox::GetListBoxSize( void ) const
{
	return m_wndListBox.GetCount();
}
#endif // __IMPROVE_MAP_SYSTEM
06/08/2018 18:32 Tweeney#4
then make it like this:

Code:
DWORD CWndComboBox::GetSelectedItemData( void ) const
{
	int nSelectedListNumber = m_wndListBox.GetCurSel();
	if( nSelectedListNumber == -1 )
	{
		return 0;
	}
	return m_wndListBox.GetItemData( nSelectedListNumber );
}
#ifdef __IMPROVE_MAP_SYSTEM
void CWndComboBox::GetListBoxText( int nIndex, CString& strString ) const
{
	m_wndListBox.GetText( nIndex, strString );
}
int CWndComboBox::GetListBoxTextLength( int nIndex ) const
{
	return m_wndListBox.GetTextLen( nIndex );
}
int CWndComboBox::GetListBoxSize( void ) const
{
	return m_wndListBox.GetCount();
}
#endif // __IMPROVE_MAP_SYSTEM
and then WndControl.h

Code:
	DWORD GetSelectedItemData( void ) const;
#ifdef __IMPROVE_MAP_SYSTEM
	void GetListBoxText( int nIndex, CString& strString ) const;
	int GetListBoxTextLength( int nIndex ) const;
	int GetListBoxSize( void ) const;
#else // __IMPROVE_MAP_SYSTEM
	int GetLBText(int nIndex, LPTSTR lpszText) const;
	void GetLBText(int nIndex, CString& rString) const;
	int GetLBTextLen(int nIndex) const;
#endif // __IMPROVE_MAP_SYSTEM
06/08/2018 21:44 firesqual#5
Or he could just define __IMPROVE_MAP_SYSTEM :|