Message fix

03/21/2020 13:07 sebariio#1
Hola
This is just a small fix for private message :

Code:
BOOL CWndMessage::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult ) 
{ 
	CWndEdit* pWndText = (CWndEdit*)GetDlgItem( WIDC_EDIT );
	switch(nID)
	{
		case WIDC_EDIT:
#ifdef __CHAT_SCROLL_FIX
			pWndText->m_wndScrollBar.SetMaxScrollPos();
#endif // __CHAT_SCROLL_FIX
			if( message == EN_RETURN)
			{
				if( pWndText->m_string.IsEmpty() == FALSE )
				{
					CString strFormat = pWndText->m_string;					
					pWndText->m_string.GetTextFormat(strFormat);
					CString string;
					string.Format( "/say \"%s\" %s", m_strPlayer, strFormat );
					
					g_DPlay.SendChat( string );
					pWndText->Empty();
				}
				//				pWndText->ResetString();
			}
			break;
		case WIDC_SEND:
			{
				CString str = pWndText->m_string;
				if( str.IsEmpty() == FALSE )
				{
					CString strFormat = pWndText->m_string;

					pWndText->m_string.GetTextFormat(strFormat);

					CString string;
					string.Format( "/say \"%s\" %s", m_strPlayer, strFormat );					
					
					g_DPlay.SendChat( string );
					pWndText->Empty();
	//				pWndText->ResetString();
				}
			}
			break;

	}
	return CWndNeuz::OnChildNotify( message, nID, pLResult ); 
}
This fix allows to do this (instead of being stuck on first line) : [Only registered and activated users can see links. Click Here To Register...]
09/19/2020 08:03 Longlong07#2
Hi may i know where at source i can put this?
09/19/2020 09:48 IFlyffMc#3
Quote:
Originally Posted by Longlong07 View Post
Hi may i know where at source i can put this?
WndMessenger.cpp
09/19/2020 09:54 VirusAtwar#4
Quote:
Originally Posted by Longlong07 View Post
Hi may i know where at source i can put this?
WndMessenger.cpp

The change he made is this part and it tells you where to put it.

Code:
#ifdef __CHAT_SCROLL_FIX
			pWndText->m_wndScrollBar.SetMaxScrollPos();
#endif // __CHAT_SCROLL_FIX
Even if he didn't say in which file you should put it he atleast gave a clue.
It's related to the messenger, right? So it could be in the "interface" directory, related to a messenger file.
If that leads to nowhere, you can simply search for a unique line, let's say

Code:
string.Format( "/say \"%s\" %s", m_strPlayer, strFormat );
(make sure to have the correct search options too to be able to search through the explorer search function [Only registered and activated users can see links. Click Here To Register...] )
09/20/2020 12:58 Longlong07#5
Can i Add you sir?