hier ein Bild:
WndField.cpp :
Code:
#ifdef __CREATE_MONSTER_APP
CWndCreateMonster::CWndCreateMonster()
{
}
CWndCreateMonster::~CWndCreateMonster()
{
}
void CWndCreateMonster::OnDraw( C2DRender* p2DRender )
{
}
BOOL CWndCreateMonster::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult )
{
if( nID == WIDC_BUTTON1 )
{
CWndListBox* pListbox = (CWndListBox*)GetDlgItem( WIDC_LISTBOX1 );
CWndEdit* pEditCount = (CWndEdit*)GetDlgItem( WIDC_EDIT1 );
CWndButton* pCheckbox = (CWndButton*)GetDlgItem( WIDC_CHECK1 );
if( pEditCount && pEditCount->GetString() != "" && atoi(pEditCount->GetString()) > 0 )
{
if( pListbox && pCheckbox )
{
CString str;
str.Format("/cn %d %d %d", pListbox->GetItemData( pListbox->GetCurSel() ), atoi(pEditCount->GetString()), pCheckbox->GetCheck() );
g_DPlay.SendChat( str );
}
}
}
else if( nID == WIDC_CANCEL )
{
Destroy();
}
return CWndNeuz::OnChildNotify( message, nID, pLResult );
}
BOOL CWndCreateMonster::Initialize( CWndBase* pWndParent, DWORD )
{
return CWndNeuz::InitDialog( g_Neuz.GetSafeHwnd(), APP_CREATE_MONSTER, 0, CPoint( 0, 0 ), pWndParent );
}
BOOL CWndCreateMonster::OnCommand( UINT nID, DWORD dwMessage, CWndBase* pWndBase )
{
return CWndNeuz::OnCommand( nID, dwMessage, pWndBase );
}
void CWndCreateMonster::OnSize( UINT nType, int cx, int cy )
{
CWndNeuz::OnSize( nType, cx, cy );
}
void CWndCreateMonster::OnLButtonUp( UINT nFlags, CPoint point )
{
}
void CWndCreateMonster::OnLButtonDown( UINT nFlags, CPoint point )
{
}
HRESULT CWndCreateMonster::RestoreDeviceObjects()
{
CWndNeuz::RestoreDeviceObjects();
return S_OK;
}
HRESULT CWndCreateMonster::InvalidateDeviceObjects()
{
CWndNeuz::InvalidateDeviceObjects();
return S_OK;
}
HRESULT CWndCreateMonster::DeleteDeviceObjects()
{
CWndNeuz::DeleteDeviceObjects();
InvalidateDeviceObjects();
return S_OK;
}
void CWndCreateMonster::OnInitialUpdate()
{
CWndNeuz::OnInitialUpdate();
CWndListBox* pListbox = (CWndListBox*)GetDlgItem( WIDC_LISTBOX1 );
if( pListbox )
{
for( int i = 0; i < prj.m_nMoverPropSize; i++ )
{
MoverProp* pMoverProp = prj.m_pPropMover + i;
if( pMoverProp->dwID != 0 )
{
if( pMoverProp->dwAI != AII_MONSTER
&& pMoverProp->dwAI != AII_AGGRO_NORMAL
&& pMoverProp->dwAI != AII_PARTY_AGGRO_SUB
&& pMoverProp->dwAI != AII_PARTY_AGGRO_LEADER
&& pMoverProp->dwAI != AII_ARENA_REAPER
&& pMoverProp->dwAI != AII_CLOCKWORKS
&& pMoverProp->dwAI != AII_BIGMUSCLE
&& pMoverProp->dwAI != AII_KRRR
&& pMoverProp->dwAI != AII_BEAR
&& pMoverProp->dwAI != AII_METEONYKER
)
continue;
int nIndex = pListbox->AddString( pMoverProp->szName );
pListbox->SetItemData( nIndex, pMoverProp->dwID );
}
}
}
MoveParentCenter();
}
void CWndCreateMonster::OnDestroy( void )
{
}
#endif //__CREATE_MONSTER_APP
Code:
#ifdef __CREATE_MONSTER_APP
class CWndCreateMonster : public CWndNeuz
{
public:
CWndCreateMonster();
~CWndCreateMonster();
virtual HRESULT RestoreDeviceObjects();
virtual HRESULT InvalidateDeviceObjects();
virtual HRESULT DeleteDeviceObjects();
virtual BOOL Initialize( CWndBase* pWndParent = NULL, DWORD nType = MB_OK );
virtual BOOL OnChildNotify( UINT message, UINT nID, LRESULT* pLResult );
virtual void OnDraw( C2DRender* p2DRender );
virtual void OnInitialUpdate();
virtual BOOL OnCommand( UINT nID, DWORD dwMessage, CWndBase* pWndBase );
virtual void OnSize( UINT nType, int cx, int cy );
virtual void OnLButtonUp( UINT nFlags, CPoint point );
virtual void OnLButtonDown( UINT nFlags, CPoint point );
virtual void OnDestroy( void );
};
#endif // __CREATE_MONSTER_APP
Code:
APP_CREATE_MONSTER "WndTile00.tga" 1 288 336 0x2410000 26
{
// Title String
"Create Monster"
}
{
// ToolTip
""
}
{
WTYPE_LISTBOX WIDC_LISTBOX1 "WndEditTile00.tga" 1 20 18 254 191 0x20020000 0 0 0 0
{
// Title String
""
}
{
// ToolTip
""
}
WTYPE_BUTTON WIDC_BUTTON1 "" 0 30 260 109 284 0x220010 0 0 0 0
{
// Title String
"Create"
}
{
// ToolTip
""
}
WTYPE_BUTTON WIDC_CANCEL "" 0 128 260 207 284 0x220010 0 0 0 0
{
// Title String
"Cancel"
}
{
// ToolTip
""
}
WTYPE_STATIC WIDC_STATIC "" 0 20 226 64 245 0x220000 0 0 0 0
{
// Title String
"Count"
}
{
// ToolTip
""
}
WTYPE_STATIC WIDC_STATIC1 "" 0 20 206 68 225 0x220000 0 0 0 0
{
// Title String
"Search"
}
{
// ToolTip
""
}
WTYPE_EDITCTRL WIDC_EDIT10 "" 1 76 206 238 225 0x20000 0 0 0 0
{
// Title String
""
}
{
// ToolTip
""
}
WTYPE_EDITCTRL WIDC_EDIT1 "" 1 76 230 195 249 0x20000 0 0 0 0
{
// Title String
"1"
}
{
// ToolTip
""
}
WTYPE_BUTTON WIDC_CHECK1 "" 0 209 232 266 246 0x220008 0 0 0 0
{
// Title String
"Aggro"
}
{
// ToolTip
""
}
}







