[Release] Delete Mail

03/20/2015 07:30 -Venom'#1
Hallo Elitepvpers,

keine Ahnung ob es jemand braucht oder ob es das schon gibt:
( Fals ja sagt bescheid )
[Only registered and activated users can see links. Click Here To Register...]

Hier der Source Code:

WndField.cpp

Über:
Code:
void CWndPostRead::OnInitialUpdate()
Das:
Code:
#ifdef __IMPROVE_MAIL
void CWndPostRead::OnLButtonDblClk(UINT nFlags, CPoint point)
{
	if( m_nMailIndex == -1 )
		return;

	CMailBox* pMailBox	= CMailBox::GetInstance();	
	CMailBox& mailbox = *pMailBox;
	
	if( !mailbox[m_nMailIndex] )
		return;

	LPWNDCTRL pCustom = GetWndCtrl(WIDC_EDIT3);
	if( pCustom->rect.PtInRect(point) )
	{
		MailReceiveGold();
	}else
	{
		pCustom = GetWndCtrl(WIDC_STATIC3);
		if( pCustom->rect.PtInRect(point) )
		{
			MailReceiveItem();
		}
	}
}
#endif // __IMPROVE_MAIL
Unter:
Code:
CWndPostReceive::CWndPostReceive():m_wndPostRead(NULL)
{ 
	m_nMax = 0;
	m_nSelect = -1;

Das:

Code:
#ifdef __IMPROVE_MAIL
	m_pWndPostDeleteConfirm = NULL;
#endif
In der Funktion:
Code:
void CWndPostReceive::OnInitialUpdate()
Sucht ihr nach dem:
Code:
m_wndScrollBar.Create( WBS_VERT, rect, this, 1000 );
Und fügt das dadrunter ein:
Code:
#ifdef __IMPROVE_MAIL
	m_wndMenu.CreateMenu(this);
	m_wndMenu.AppendMenu(0,0,"Delete");
	m_wndMenu.AppendMenu(0,1,"Empty");
#endif
Unter:
Code:
void CWndPostReceive::OnLButtonDown( UINT nFlags, CPoint point ) 
{
Das:
Code:
#ifdef __IMPROVE_MAIL
	m_wndMenu.SetVisible(FALSE);
#endif
Unter:
Code:
BOOL CWndPostReceive::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult ) 
{
Das:
Code:
#ifdef __IMPROVE_MAIL
	CWndBase *pWndBase = (CWndBase*)pLResult;
	if( pWndBase && pWndBase->m_pParentWnd == &m_wndMenu )
	{
		SetFocus();
		m_wndMenu.SetVisible(FALSE);
		if( m_nSelect == -1 )
			return FALSE;
		CMailBox* pMailBox	= CMailBox::GetInstance();	
		CMailBox& mailbox = *pMailBox;
		CMail* pMail = mailbox[m_nSelect];
		if( !pMail )
			return FALSE;
		if( nID == 0 )
		{
			if( pMail->m_pItemElem || pMail->m_nGold )
			{
				m_pWndPostDeleteConfirm = new CWndPostDeleteConfirm();
				m_pWndPostDeleteConfirm->Initialize(this);
				m_pWndPostDeleteConfirm->SetValue(m_nSelect);
			}else
			{
				g_DPlay.SendQueryRemoveMail(pMail->m_nMail);
			}
		}else if( nID == 1 )
		{
			if( pMail->m_pItemElem )
			{
				g_DPlay.SendQueryGetMailItem(pMail->m_nMail);
			}
			if( pMail->m_nGold )
			{
				g_DPlay.SendQueryGetMailGold(pMail->m_nMail);
			}
		}
	}
#endif
In der Funktion:
Code:
BOOL CWndPostReceive::OnMouseWheel( UINT nFlags, short zDelta, CPoint pt )
Sucht ihr nach:
Code:
	{
		if( m_wndScrollBar.GetMinScrollPos() < m_wndScrollBar.GetScrollPos() )
			m_wndScrollBar.SetScrollPos( m_wndScrollBar.GetScrollPos()-1 );
		else
			m_wndScrollBar.SetScrollPos( m_wndScrollBar.GetMinScrollPos() );
	}
	
	return TRUE;
}
Und fügt dadrunter das ein:
Code:
#ifdef __IMPROVE_MAIL
void CWndPostReceive::OnRButtonUp(UINT nFlags, CPoint point)
{
	int nIndex = GetSelectIndex(point);
	if( nIndex != -1 )
	{
		m_nSelect = nIndex;
		ClientToScreen(&point);
		m_wndMenu.Move(point);
		m_wndMenu.SetVisible(TRUE);
		m_wndMenu.SetFocus();
	}
}
#endif
WndField.h

Sucht nach:
Code:
class CWndPostDeleteConfirm;
class CWndPostRead : public CWndNeuz
Unter:
Code:
	virtual void OnRButtonUp( UINT nFlags, CPoint point );
Das:
Code:
#ifdef __IMPROVE_MAIL
	virtual void OnLButtonDblClk(UINT nFlags, CPoint point);
#endif
Unter:
Code:
class CWndPostReceive : public CWndNeuz
{
Das:
Code:
#ifdef __IMPROVE_MAIL
	CWndMenu m_wndMenu;
	CWndPostDeleteConfirm *m_pWndPostDeleteConfirm;
#endif
In der selben Class unter:
Code:
	virtual HRESULT DeleteDeviceObjects();
	virtual void OnMouseWndSurface( CPoint point );
Das:
Code:
#ifdef __IMPROVE_MAIL
	virtual void OnRButtonUp(UINT nFlags, CPoint point);
#endif
VersionCommon.h [Neuz]:
Code:
#define __IMPROVE_MAIL
Cedits:
99% WurstbrotQT
1% Titanos fürs Releasen
03/21/2015 02:23 romzik#2
Gut gemacht! Danke! Es ist bequem mit diese funktion! Thanks
03/21/2015 11:30 -Venom'#3
Quote:
Originally Posted by romzik View Post
Gut gemacht! Danke! Es ist bequem mit diese funktion! Thanks
Der Source Code ist nicht von mir. Trotzdem bitte schön.
Ich werde in nächster Zeit einige nützliche dinge Releasen
03/22/2015 13:23 - DK#4
Quote:
Originally Posted by Titanos™ View Post
Der Source Code ist nicht von mir. Trotzdem bitte schön.
Ich werde in nächster Zeit einige nützliche dinge Releasen
Von Crowley :x ? -> Gib bitte Credits an .. Moral Bro :3
03/22/2015 18:58 -Venom'#5
Quote:
Originally Posted by Armageddon' View Post
Von Crowley :x ? -> Gib bitte Credits an .. Moral Bro :3

Wurstbrot steht da ich glaub kaum das es Crowley war.