Hallo Elitepvpers,
keine Ahnung ob es jemand braucht oder ob es das schon gibt:
( Fals ja sagt bescheid )
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