void CTargetMenu::Show()
{
	CObjCHAR *pObj = (CObjCHAR*)g_pObjMGR->Get_CharOBJ( m_iTargetAvatarID, true );

	if( pObj == NULL )
		return;
	
	///Target이 아바타일경우에만 현재 스크린 좌표에 따라서 윈도우의 위치 조정
	if( pObj->Get_TYPE() == OBJ_AVATAR ) 
	{
		D3DVECTOR   PosSCR;
		POINT		ptNew;
		pObj->GetScreenPOS (PosSCR);	
		ptNew.x = (int)PosSCR.x - GetWidth() / 2;
		ptNew.y = (int)PosSCR.y - ( GetHeight() * 2 / 3 );
		MoveWindow( ptNew );
		CTDialog::Show();
	}
	SetEnableChild( IID_BTN_FRIEND, false );
	SetEnableChild(	IID_BTN_INFORMATION,false );

}
void CTargetMenu::Update( POINT ptMouse )
{
	if( !IsVision()) return;

	CTDialog::Update( ptMouse );
	if( m_iTargetAvatarID )
	{
		CObjCHAR *pObj = (CObjCHAR*)g_pObjMGR->Get_CharOBJ( m_iTargetAvatarID, true );
		/// 유효하지 않은 타겟이다.. 마우스 컴맨드 초기화
		if( pObj == NULL )
		{
			Hide();
		}
		else
		{
			if( g_pAVATAR->Get_DISTANCE( pObj ) >= 1200 )
				Hide();
			else
			{
				D3DVECTOR   PosSCR;
				POINT		ptNew;
				pObj->GetScreenPOS (PosSCR);	
				ptNew.x = (int)PosSCR.x - GetWidth() / 2;
				ptNew.y = (int)PosSCR.y - ( GetHeight() * 2 / 3 );
				MoveWindow( ptNew );

			}
		}
	}
	

	WINCTRL_LIST_ITOR iter;
	CWinCtrl*	pCtrl;
	
	for( iter = m_listChild.begin(); iter != m_listChild.end(); ++iter)
	{
		pCtrl = *iter;
		if( pCtrl->GetControlType() == CTRL_IMAGE )
			continue;

		if( pCtrl->IsInside(ptMouse.x, ptMouse.y ) )
		{
//			g_itMGR.DrawToolTip( (short)ptMouse.x, (short)ptMouse.y, GetDialogType(), pCtrl->GetControlID());
			break;
		}
	}


/*
	int iTargetID = g_pAVATAR->m_iServerTarget;
	if( iTargetID )
	{
		CObjCHAR *pObj = (CObjCHAR*)g_pObjMGR->Get_CharOBJ( g_CommandState.GetCurrentTarget(), true );
		/// 유효하지 않은 타겟이다.. 마우스 컴맨드 초기화
		if( pObj == NULL )
		{
			g_CommandState.ClearMouseState();
			Hide();
			return;
		}
		
		///Target이 아바타일경우에만 현재 스크린 좌표에 따라서 윈도우의 위치 조정
		if( pObj->Get_TYPE() == OBJ_AVATAR ) 
		{
			D3DVECTOR   PosSCR;
			POINT		ptNew;
			pObj->GetScreenPOS (PosSCR);	
			ptNew.x = (int)PosSCR.x - GetWidth() / 2;
			ptNew.y = (int)PosSCR.y - ( GetHeight() * 2 / 3 );
			MoveWindow( ptNew );
			m_iTargetAvatarID = iTargetID;
//			Show();
		}
		else
		{
			Hide();
		}
	}
	else
		Hide();
*/
}