Exemple #1
0
BOOL LWRouteAirfield::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	CRListBox* rlistbox;
	rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL1);
	rlistbox->Clear();
	rlistbox->AddColumn(80);
	rlistbox->AddColumn(TARGETFIELDWIDTH);										  //RDH 02/06/99
	rlistbox->AddColumn(60);										  //RDH 02/06/99
	rlistbox->AddColumn(60);										  //RDH 02/06/99
	rlistbox->AddColumn(60);
	rlistbox->AddString("",0);
	rlistbox->AddString(RESSTRING(LOCATION),1);
	rlistbox->AddString(RESSTRING(ETA),2);
	rlistbox->AddString(RESSTRING(RELTOT),3);
	rlistbox->AddString(RESSTRING(FUEL),4);
	
	rlistbox->AddString("Strike",0);
	rlistbox->AddString("Wissen",1);
	rlistbox->AddString("14:00",2);
	rlistbox->AddString("-01:20",3);
	rlistbox->AddString("3000",4);

	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Exemple #2
0
void HostilesList::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(HostilesList)
	DDX_Control(pDX, IDC_RLISTBOXCTRL1, m_IDC_RLISTBOXCTRL1);
	DDX_Control(pDX, IDC_RBUTTONAUTHORISE, m_IDC_RBUTTONAUTHORISE);
	DDX_Control(pDX, IDC_RBUTTONASSIGNPATROL, m_IDC_RBUTTONASSIGNPATROL);
	DDX_Control(pDX, IDC_RBUTTONINTELL, m_IDC_RBUTTONINTELL);
	DDX_Control(pDX, IDC_RBUTTONMISSIONFOLDER, m_IDC_RBUTTONMISSIONFOLDER);
	DDX_Control(pDX, IDC_ATTARGET, m_IDC_ATTARGET);
	DDX_Control(pDX, IDC_FORMING, m_IDC_FORMING);
	DDX_Control(pDX, IDC_INCOMING, m_IDC_INCOMING);
	DDX_Control(pDX, IDC_RAID_ENGAGED, m_IDC_RAID_ENGAGED);
	DDX_Control(pDX, IDC_ENGAGED, m_IDC_ENGAGED);
	DDX_Control(pDX, IDC_NORESPONSE, m_IDC_NORESPONSE);
	DDX_Control(pDX, IDC_OUTGOING, m_IDC_OUTGOING);
	DDX_Control(pDX, IDC_RESPONSES, m_IDC_RESPONSES);
	//}}AFX_DATA_MAP
	CRListBox* rlistbox;
	rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL1);
	rlistbox->AddString("",0);
	rlistbox->AddColumn(32);										  //RDH 02/06/99
	rlistbox->AddColumn(20);										  //RDH 02/06/99
	rlistbox->AddColumn(2);
}
Exemple #3
0
void CBattleDetail::FillBtmBox()
{
		CRListBox* rlistbox;
	rlistbox=GETDLGITEM(IDC_RLISTBOXBTM);
	rlistbox->Clear();
	rlistbox->AddColumn(120);
	rlistbox->AddColumn(40);
	rlistbox->AddColumn(64);
	rlistbox->AddColumn(100);

	rlistbox->AddString(RESSTRING(UNIT),0);
	rlistbox->AddString(RESSTRING(SIZE),1);
	rlistbox->AddString(RESSTRING(STATUS),2);
	rlistbox->AddString(RESSTRING(LOCATION),3);

	TeamDef* topteam = &node->supplyline->groundbattle.teamlist[teams[currrow]];
	if (teams[currrow] != -1)
	{
//DeadCode RDH 14Jun99 		CRListBox* rlistbox;
//DeadCode RDH 14Jun99 		rlistbox=GETDLGITEM(IDC_RLISTBOXBTM);
		for (int i=0;i<node->supplyline->groundbattle.usedteams;i++)
		{
			if (node->supplyline->groundbattle.teamlist[i].team!=blueforce)
			{
				TeamDef* btmteam = &node->supplyline->groundbattle.teamlist[i];
				 
				if	(		(btmteam->nextnode == topteam->node)
						||	(btmteam->node == topteam->nextnode)
						||	(btmteam->node == topteam->node)
						||	(btmteam->nextnode == topteam->nextnode)
					)
					
				{
					rlistbox->AddString(LoadResString(node->supplyline->groundbattle.teamlist[i].forcename),0);
					rlistbox->AddString(CSprintf(" %i",node->supplyline->groundbattle.teamlist[i].strength/100),1);
					rlistbox->AddString(LoadResString(IDS_L_INACTIVE + node->supplyline->groundbattle.teamlist[i].action),2);
					CString string, string2;
					string.LoadString(node->supplyline->groundbattle.teamlist[i].node->mainids);
					if (string.GetLength() > 0)
					{
						string.TrimLeft();
						string2 = string;
						string2.MakeUpper();
						string.SetAt(0, string2.GetAt(0));
	//DEADCODE RDH 03/04/99 					rlistbox->AddString(LoadResString(node->supplyline->groundbattle.teamlist[i].node->mainids),3);
						rlistbox->AddString(string,3);
					}				
				}
			}
		}
		rlistbox=GETDLGITEM(IDC_RLISTBOXTOP);
		rlistbox->SetHilightRow(currrow+1);
	}
}
Exemple #4
0
void CSelectSession::OnTimer(UINT nIDEvent) 
{
 	if (nIDEvent==m_timer)
	{
		ULong c1=0,c2=0;
		LPENUMSESSION temp;
		CRListBox* rlistbox;

		temp=_DPlay.SessionList;
		while (temp)
		{
			c1++;
			temp=temp->Next;
		}

		_DPlay.UIGetSessionListUpdate();

		temp=_DPlay.SessionList;
		while (temp)
		{
			c2++;
			temp=temp->Next;
		}

		if (c1!=c2)
		{
			rlistbox=GETDLGITEM(IDC_RLIST_SELECTSESSION);
			rlistbox->Clear();
			rlistbox->AddColumn(200);

			temp=_DPlay.SessionList;
			while (temp)
			{
				if (_DPlay.singlesession)
				{
					strncpy(_DPlay.SessionName,_DPlay.SessionList->sname,59);
					_DPlay.SessionName[59]=NULL;

					KillTimer(m_timer);

					FullPanel()->OnSelectRlistbox(1,1);
					return;

				}
				rlistbox->AddString(temp->sname,0);
				temp=temp->Next;
			}
			currsessrow=-1;
		}

//		if (currsessrow>=0)
//		{
//			rlistbox->SetHilightRow(currsessrow);
//		}
	}
	CDialog::OnTimer(nIDEvent);
}
Exemple #5
0
void EndOfDayReviewList::Refresh()
{
	CRListBox* rlistbox;
	rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL1);
	rlistbox->Clear();
	rlistbox->AddColumn(60);
	rlistbox->AddColumn(TARGETFIELDWIDTH);										  //RDH 02/06/99
	rlistbox->AddString(RESSTRING(DATE),0);
	rlistbox->AddString(RESSTRING(TITLE),1);
	

	CString msgstr;
	for (int i = 0; i < maxmsg; i++)
	{
		rlistbox->AddString(GetDateName(Node_Data.review.messages[msglist[i]].time*SECSPERDAY, DATE_LONG),0);
		msgstr = Node_Data.review.MessageTitleToText(msglist[i]);
		rlistbox->AddString(msgstr,1);
	}

}
Exemple #6
0
BOOL CommsChat::OnInitDialog() 
{
	CDialog::OnInitDialog();
	CRListBox* rlistbox;
	
	CREdit* e=GETDLGITEM(IDC_PLAYERCHAT);
	e->SetCaption("\b\b\x20");	//set max length of 32 characters
	e->SetCaption("\b\t\v\n");	//block these characters. Space is allowed.
	e->SetCaption("");

	rlistbox=GETDLGITEM(IDC_RLIST_INCOMING_CHAT);
	rlistbox->Clear();
	rlistbox->AddColumn(120);
	rlistbox->AddColumn(30);
	_DPlay.listptr=(UByteP)rlistbox;
	_DPlay.UpdateChatBox();

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Exemple #7
0
BOOL CSelectService::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	CRListBox* rlistbox;
	CString string;

	rlistbox=GETDLGITEM(IDC_RLIST_SELECTSERVICE);
	rlistbox->Clear();
	rlistbox->AddColumn(200);


	LPENUMSERVICE temp;

	temp=_DPlay.ServiceList;
	while (temp)
	{
		rlistbox->AddString(temp->sname,0);
		temp=temp->Next;
	}

	temp=_DPlay.ServiceList;
	int row  = 0;
	while	(	(temp)
			&&	(strcmp(temp->sname,_DPlay.ServiceName))
			)
	{
		temp=temp->Next;
		row++;
	}
	if (!temp)
	{
		row = 0;
		temp=_DPlay.ServiceList;
		if (temp)
		{
			strcpy(_DPlay.ServiceName,temp->sname);
		}
	}
	rlistbox->SetHilightRow(row);

// OK, a new session a new chance to process some messages...cool eh?

	_DPlay.LeaveCommsFlag=FALSE;
	_DPlay.HostQuitFlag=FALSE;
//	_DPlay.GameType=DEATHMATCH;

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Exemple #8
0
BOOL CSelectSession::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	m_timer=SetTimer(2365,0,NULL);

	CRListBox* rlistbox;
	CString string;

	rlistbox=GETDLGITEM(IDC_RLIST_SELECTSESSION);
	rlistbox->Clear();
	rlistbox->AddColumn(200);

//DeadCode AMM 13Jul98 	ULong temp=_DPlay.JoinNameCount;
//DeadCode AMM 13Jul98 	char** Name=_DPlay.JoinNames;
//DeadCode AMM 13Jul98 
//DeadCode AMM 13Jul98 	while (temp--)
//DeadCode AMM 13Jul98 	{
//DeadCode AMM 13Jul98 		rlistbox->AddString(*Name,0);
//DeadCode AMM 13Jul98 		*Name++;
//DeadCode AMM 13Jul98 	}
//DeadCode AMM 13Jul98 
//DeadCode AMM 13Jul98 	rlistbox->AddString("Dont forget to get some real sessions",0);
//DeadCode AMM 13Jul98 	rlistbox->AddString("and fill in names structure",0);
//DeadCode AMM 13Jul98 	rlistbox->AddString("...",0);
//DeadCode AMM 13Jul98 	rlistbox->AddString("or people wont be able to join!",0);
//DeadCode AMM 13Jul98 	rlistbox->AddString("and that would be a shame",0);
//DeadCode AMM 13Jul98 	rlistbox->AddString("...",0);
//DeadCode AMM 13Jul98 	rlistbox->AddString("wouldnt it?",0);
//DeadCode AMM 13Jul98 	rlistbox->AddString("...",0);
//DeadCode AMM 13Jul98 	rlistbox->AddString("...",0);
//DeadCode AMM 13Jul98 	rlistbox->AddString("how many lines can these things take?",0);

	LPENUMSESSION temp;

	temp=_DPlay.SessionList;
	while (temp)
	{
		rlistbox->AddString(temp->sname,0);
		temp=temp->Next;
	}
	currsessrow=-1;
//DeadCode AMM 12Jul98 	string.LoadString(IDS_SESSION);
//DeadCode AMM 12Jul98 	rlistbox->AddString(string,0);
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Exemple #9
0
void	GroupGeschwader::RefreshGr13()
{
	CRListBox* rlistbox;
	rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL1);
	rlistbox->ShowWindow(false);

	rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL2);
	rlistbox->Clear();
	rlistbox->AddColumn(SQUADRONPLUSFIELDWIDTH);
	rlistbox->AddColumn(SQUADRONPLUSFIELDWIDTH);
		CRStatic*   s;
	
	s=GETDLGITEM(IDC_RSTATICCTRL7);
	s->ShowWindow(false);
	s=GETDLGITEM(IDC_RSTATICCTRL23);
	s->ShowWindow(false);
//RDH 02/06/99

	rlistbox->AddString(RESSTRING(HURRICANES),0);
	rlistbox->AddString(RESSTRING(SPITFIRES),1);

	FindAirfields();
	int k=0, numsq = 0;
	while (Node_Data.squadron[k].squadron != SQ_ZERO)
	{
 		if (Node_Data.squadron[k].homeairfield == Airfields[0][0])
		{
			int actype = Node_Data.squadron[k].AcType();
			int index = 0;
			if	(		(actype == PT_SPIT_A)
					||	(actype == PT_SPIT_B)
				)
				index = 1;
				
			rlistbox->AddString(Node_Data.squadron[k].SubName()+ " "+RESSTRING(SQUADRON),index);
		}

		k++;
	}


}
Exemple #10
0
BOOL CBattleDetail::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	CRListBox* rlistbox;
	rlistbox=GETDLGITEM(IDC_RLISTBOXTOP);
	rlistbox->Clear();
	rlistbox->AddColumn(120);
	rlistbox->AddColumn(40);
	rlistbox->AddColumn(64);
	rlistbox->AddColumn(100);

	rlistbox->AddString(RESSTRING(UNIT),0);
	rlistbox->AddString(RESSTRING(SIZE),1);
	rlistbox->AddString(RESSTRING(STATUS),2);
	rlistbox->AddString(RESSTRING(LOCATION),3);


//DeadCode RDH 14Jun99 	rlistbox=GETDLGITEM(IDC_RLISTBOXBTM);
//DeadCode RDH 14Jun99 	rlistbox->Clear();
//DeadCode RDH 14Jun99 	rlistbox->AddColumn(120);
//DeadCode RDH 14Jun99 	rlistbox->AddColumn(40);
//DeadCode RDH 14Jun99 	rlistbox->AddColumn(64);
//DeadCode RDH 14Jun99 	rlistbox->AddColumn(100);
//DeadCode RDH 14Jun99 
//DeadCode RDH 14Jun99 	rlistbox->AddString(RESSTRING(UNIT),0);
//DeadCode RDH 14Jun99 	rlistbox->AddString(RESSTRING(SIZE),1);
//DeadCode RDH 14Jun99 	rlistbox->AddString(RESSTRING(STATUS),2);
//DeadCode RDH 14Jun99 	rlistbox->AddString(RESSTRING(LOCATION),3);

	
	CRStatic*   s0=GETDLGITEM(IDC_RSTATICCTRL2);
	CRStatic*   s1=GETDLGITEM(IDC_RSTATICCTRL3);
	if (tabside == 0)
	{
		s0->SetString(RESSTRING(UNFORCES));
		s1->SetString(RESSTRING(REDFORCES));
	}else
	{
		s1->SetString(RESSTRING(UNFORCES));
		s0->SetString(RESSTRING(REDFORCES));
	}
	
	for (int i=0;i<BattleStruct::MAXTEAMS;i++)
		teams[i] = -1;

	node=SupplyTree::FindSupplyNodeForItem((UniqueID)u);
	if (node)
	{
		if	(		(node->supplyline->initiative==REDATTACKING)
				==	(tabside == 0)
			)
			blueforce = TeamDef::HOME;
		else
			blueforce = TeamDef::AWAY;
		currrow = 0;
		FillTopBox();
		FillBtmBox();
	}else
		currrow = -1;


	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Exemple #11
0
void LWDiaryDetails::Refresh()
{
		CRRadio* pradio;

	pradio=GETDLGITEM(IDC_RRADIODISPLAY);
	if (quickmission)
		pradio->ShowWindow(false);
	else
		pradio->ShowWindow(true);
	pradio->AddButton(RESSTRING(VIEWSINGLE));
	pradio->AddButton(RESSTRING(ALL));
	pradio->SetCurrentSelection(0);

	CRListBox* rlistbox;
	rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL1);
	rlistbox->Clear();
	rlistbox->AddColumn(60);
	rlistbox->AddColumn(80);										  //RDH 02/06/99
	rlistbox->AddColumn(60);										  //RDH 02/06/99

	rlistbox=GETDLGITEM(IDC_RLISTBOXOTHERS);
	rlistbox->Clear();
	rlistbox->AddColumn(60);
	rlistbox->AddColumn(60);										  //RDH 02/06/99
	rlistbox->AddString(RESSTRING(GRUPPE),0);
	rlistbox->AddString(RESSTRING(TASK),1);
	CRStatic*   s;


	if (		(*currentptr >= 0)
			&&	(grdtlsptr[*currentptr])
		)
	{
		Diary::RaidGroup* raidgroup;
		Diary::Gruppen*	grentry;
	 	raidgroup = Squad_Diary.GetRaidGroup(grdtlsptr[*currentptr]);

		Diary::Gruppen* othergr = Squad_Diary.GetFirstSquadron(raidgroup);
		rlistbox=GETDLGITEM(IDC_RLISTBOXOTHERS);
	

		while (othergr)
		{
			if (othergr != grdtlsptr[*currentptr] && othergr->noaclaunched)
			{
				Squadron* sq = &Node_Data[(SquadNum)othergr->squadnum];
				CString name = sq->ShortName() + "/";
				name = name + sq->SubName();

				rlistbox->AddString(name,0);

				raidgroup = Squad_Diary.GetRaidGroup(othergr);
				int cnt = (int)	raidgroup->misstype;
	 			rlistbox->AddString(RESLIST(MT_RAID, cnt),1);
 
			}
			othergr = Squad_Diary.GetNextSquadron(othergr);
		}


//DeadCode RJS 4Sep00 		raidgroup = Squad_Diary.GetRaidGroup(grdtlsptr[*currentptr]);
		
		
		raidgroup = Squad_Diary.GetRaidGroup(grdtlsptr[*currentptr]);
		if (raidgroup)
		{
			int	theTime = 0;											//RJS 4Sep00

			//raid
			s=GETDLGITEM(IDC_RSTATICDIARYDATE);
			Diary::RaidPack* raidpack = Squad_Diary.GetRaidPack(raidgroup);
			if (raidpack)
			{
				s->SetString(GetDateName(raidpack->date * SECSPERDAY, DATE_LONG));

				int strikeac = 0, attachedac = 0, detachedac = 0,myrole=0;
				TotalUpAc( strikeac, attachedac, detachedac ,myrole);
				s=GETDLGITEM(IDC_RSTATICMAIN);
				myrole&=Profile::AM_GROUPMASK;
				if (myrole==Profile::AM_LWPACKS)
					s->SetString(CSprintf("%i/%i",grdtlsptr[*currentptr]->noaclaunched,strikeac));
				else
					s->SetString(CSprintf("%i",strikeac));
				s=GETDLGITEM(IDC_RSTATICDETACHED);
				if (myrole==Profile::AM_DETACHED)
					s->SetString(CSprintf("%i/%i",grdtlsptr[*currentptr]->noaclaunched,detachedac));
				else
					s->SetString(CSprintf("%i",detachedac));
				s=GETDLGITEM(IDC_RSTATICATTACHED);
				if (myrole>=Profile::AM_ATTACHED)
					s->SetString(CSprintf("%i/%i",grdtlsptr[*currentptr]->noaclaunched,attachedac));
				else
					s->SetString(CSprintf("%i",attachedac));

				EncounteredAcType seenac[3]={{PT_BADMAX}};
				int hurrseen = 0, spitseen = 0, hurrkilled = 0, spitkilled = 0;
				TotalEncounteredAc(seenac);
				CRListBox* rlistbox;
				rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL1);
				rlistbox->AddString(RESSTRING(TYPE),0);
				rlistbox->AddString(RESSTRING(ENCOUNTERED),1);
				rlistbox->AddString(RESSTRING(CLAIMS),2);
//DeadCode JIM 23Oct00 				if (seenac[2].totalkilled)
//DeadCode JIM 23Oct00 					if (seenac[0].encountered==0)
//DeadCode JIM 23Oct00 						seenac[2].localkilled = seenac[0].localkilled;
//DeadCode JIM 23Oct00 					else
//DeadCode JIM 23Oct00 						if (seenac[1].encountered==0)
//DeadCode JIM 23Oct00 							seenac[2].localkilled = seenac[1].localkilled;
				for (int i=0;i<3;i++)
					if (seenac[i].encountered)
					{	
						if (seenac[i].localkilled>seenac[i].totalkilled)
							seenac[i].localkilled=seenac[i].totalkilled;
							
						rlistbox->AddString(RESLIST(SPIT_A,seenac[i].type),0);
 						rlistbox->AddString(CSprintf("%i",seenac[i].encountered),1);
						rlistbox->AddString(CSprintf("%i/%i",seenac[i].localkilled,seenac[i].totalkilled),2);
					}
				rlistbox->AddString(RESSTRING(TOTAL),0);
				rlistbox->AddString(CSprintf("%i",
					seenac[0].encountered+seenac[1].encountered+seenac[2].encountered),1);
				rlistbox->AddString(CSprintf("%i/%i",
					seenac[0].localkilled+seenac[1].localkilled+seenac[2].localkilled,
					seenac[0].totalkilled+seenac[1].totalkilled+seenac[2].totalkilled
					),2);

				theTime = raidpack->takeofftime;						//RJS 4Sep00
			}
			else
			{
				s->SetString("");
				s=GETDLGITEM(IDC_RSTATICMAIN);
				s->SetString("");
				s=GETDLGITEM(IDC_RSTATICDETACHED);
				s->SetString("");
				s=GETDLGITEM(IDC_RSTATICATTACHED);
				s->SetString("");


			}
			s=GETDLGITEM(IDC_RSTATICPERSONNEL);
			s->SetString("");

			s=GETDLGITEM(IDC_RSTATICTARGET);
			if(!raidgroup->target)
			{
				s->SetString("");
				s=GETDLGITEM(IDC_RSTATICRESULT);
				s->SetString("");
			}
			else
			{
				s->SetString(GetTargName(raidgroup->target));

				s=GETDLGITEM(IDC_RSTATICRESULT);
//DeadCode JIM 20Oct00 			 	TargetNoDetail* trg = Node_Data[raidgroup->target];

				CString	missString;										//RJS 9Nov00

				Squad_Diary.GetMissResult(grdtlsptr[*currentptr],raidgroup,missString);

				s->SetString(missString);								//RJS 9Nov00
//DeadCode RJS 09Nov00 				s->SetString(RESLIST(MR_NULL,raidgroup->missresult));
//DeadCode JIM 13Oct00 				int j = trg->PlayerStatus();
//DeadCode JIM 13Oct00 				if	(		(j == Target::TS_FLAG_UNKNOWN))
//DeadCode JIM 13Oct00 					s->SetString(RESSTRING(TT_UNKNOWN));
//DeadCode JIM 13Oct00 				else
//DeadCode JIM 13Oct00 				{
//DeadCode JIM 13Oct00 					if		(j >= Target::TS_NEARLYDESTROYED)		j = 3;
//DeadCode JIM 13Oct00 					elseif	(j>Target::TS_BADDAMAGE)				j=2;
//DeadCode JIM 13Oct00 					elseif	(j>Target::TS_LIGHTDAMAGE)				j=1;
//DeadCode JIM 13Oct00 					else											j=0;
//DeadCode JIM 13Oct00 					s->SetString(RESLIST(UNDAMAGED, j));
//DeadCode JIM 13Oct00 				}
			}

			s=GETDLGITEM(IDC_RSTATICTASK);
			s->SetString(RESLIST(MT_RAID, raidgroup->misstype));

			s=GETDLGITEM(IDC_RSTATICTIME);

			if (raidgroup->targettime)									//RJS 4Sep00
				theTime = raidgroup->targettime;						//RJS 4Sep00
																		//RJS 4Sep00
 			theTime/=60;												//RJS 4Sep00
			s->SetString(CSprintf("%02i:%02i",theTime/60,theTime%60));	//RJS 4Sep00


			s=GETDLGITEM(IDC_RSTATICAIRCRAFT);
			Squadron* sq  = Node_Data[*grnumptr];
			s->SetString(RESLIST(SPIT_A, sq->AcType()));
		}

		s=GETDLGITEM(IDC_RSTATICDAMAGED);
		s->SetString(CSprintf("%i",grdtlsptr[*currentptr]->numacdamaged));

		s=GETDLGITEM(IDC_RSTATICDESTROYED);
		s->SetString(CSprintf("%i",grdtlsptr[*currentptr]->numlosses));
		s=GETDLGITEM(IDC_RSTATICAIRCREW);
		s->SetString(CSprintf("%i",grdtlsptr[*currentptr]->numpilotslost));

	}else
	{



		s=GETDLGITEM(IDC_RSTATICDIARYDATE);
		s->SetString("");
		s=GETDLGITEM(IDC_RSTATICTASK);
		s->SetString("");
		s=GETDLGITEM(IDC_RSTATICTIME);
		s->SetString("");

		s=GETDLGITEM(IDC_RSTATICAIRCRAFT);
		s->SetString("");
		s=GETDLGITEM(IDC_RSTATICRESULT);
		s->SetString("");
		s=GETDLGITEM(IDC_RSTATICTARGET);
		s->SetString("");

		s=GETDLGITEM(IDC_RSTATICMAIN);
		s->SetString("");
		s=GETDLGITEM(IDC_RSTATICDETACHED);
		s->SetString("");
		s=GETDLGITEM(IDC_RSTATICATTACHED);
		s->SetString("");


		s=GETDLGITEM(IDC_RSTATICPERSONNEL);
		s->SetString("");

		s=GETDLGITEM(IDC_RSTATICDAMAGED);
		s->SetString("");
		s=GETDLGITEM(IDC_RSTATICDESTROYED);
		s->SetString("");
		s=GETDLGITEM(IDC_RSTATICAIRCREW);
		s->SetString("");
	}
	RefreshButtons();
}
Exemple #12
0
BOOL CRIP_List::OnInitDialog() 
{
	CDialog::OnInitDialog();

	RDialog* parent=(RDialog*)GetParent();
//	parent->SetMaxSize(CRect(0,0,350,350));

	CRStatic*   s;
	s=GETDLGITEM(IDC_RIPDATE);

	
	s->SetString(GetDateName(MMC.ripdate, DATE_LONG));
//	s->SetString(cdate);

	CRListBox* rlistbox;
	rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL1);
	rlistbox->Clear();
	rlistbox->AddColumn(150);
	rlistbox->AddColumn(60);
	rlistbox->AddColumn(70);
	rlistbox->AddColumn(50);

	rlistbox->AddString(RESSTRING(NAME),0);
	rlistbox->AddString(RESSTRING(KILLS),1);
	rlistbox->AddString(RESSTRING(DATE),2);
	rlistbox->AddString(RESSTRING(STATUS),3);
	char buffer[10];

	int i = MMC.nextdeadpilot - 1;
	while (i >= 0)
	{
		rlistbox->AddString(
				MakePilotName(MMC.dead_pilots[i].name),0);
		_itoa(MMC.dead_pilots[i].kills,buffer,10);
		rlistbox->AddString((buffer),1);

		rlistbox->AddString(GetDateName(MMC.dead_pilots[i].lastdate, DATE_SHORT),2);
		rlistbox->AddString(RESLIST(NOTFLYING,MMC.dead_pilots[i].status),3);


		i--;
	}
	i = CASUALTYLIST-1;
	while (i >= MMC.nextdeadpilot)
	{
		if (MMC.dead_pilots[i].lastdate != 0)
		{
			rlistbox->AddString(
				MakePilotName(MMC.dead_pilots[i].name),0);
			_itoa(MMC.dead_pilots[i].kills,buffer,10);
			rlistbox->AddString((buffer),1);

			rlistbox->AddString(GetDateName(MMC.dead_pilots[i].lastdate, DATE_SHORT),2);
			rlistbox->AddString(RESLIST(NOTFLYING,MMC.dead_pilots[i].status),3);
		}

		i--;
	}



//	rlistbox->AddString("20/2/51",0);
//	rlistbox->AddString("20/2/51",0);
//	rlistbox->AddString("20/2/51",0);
//	rlistbox->AddString("M.I.A",1);
//	rlistbox->AddString("W.I.A",1);
//	rlistbox->AddString("K.I.A",1);
//	rlistbox->AddString("Blah Blah",2);
//	rlistbox->AddString("Blah Blah",2);
//	rlistbox->AddString("Blah Blah",2);
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Exemple #13
0
void RAFDiaryList::Refresh()
{

//DEADCODE  10/02/00 	FindDetails();
	
	CRRadio* pradio;

	pradio=GETDLGITEM(IDC_RRADIODISPLAY);
	pradio->AddButton(RESSTRING(VIEWSINGLE));
	pradio->AddButton(RESSTRING(ALL));
  	pradio->SetCurrentSelection(1);


	CRListBox* rlistbox;
	rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL1);
	rlistbox->Clear();
	rlistbox->AddColumn(100);
	rlistbox->AddColumn(1);
	rlistbox->AddColumn(60);
	rlistbox->AddColumn(60);
	rlistbox->AddColumn(70);
	rlistbox->AddColumn(TARGETFIELDWIDTH+50);										  //RDH 02/06/99
	rlistbox->AddColumn(60);

	
	rlistbox->AddString(RESSTRING(DATE),0);
	rlistbox->AddString("",1);
	rlistbox->AddString(RESSTRING(SIZE),2);
	rlistbox->AddString(RESSTRING(TO),3);
	rlistbox->AddString(RESSTRING(MISSION),4);
	rlistbox->AddString(RESSTRING(TARGET),5);
	rlistbox->AddString(RESSTRING(TALLY),6);


	Diary::RaidGroup* raidgroup;

	Diary::Intercept* intercept;
	Diary::Squadron*	sqentry;
	int i = 0;
 	while (	(i < RAFDiary::MAX_SQDETAILS) && (sqdtlsptr[i]))
 	{
		sqentry = (Diary::Squadron*)sqdtlsptr[i];
		intercept = Squad_Diary.GetIntercept(sqdtlsptr[i]);
		if (intercept)
		{
 			raidgroup = Squad_Diary.GetRaidGroup(intercept);
			//date
			if (raidgroup)
			{
				Diary::RaidPack* raidpack = Squad_Diary.GetRaidPack(raidgroup);
				if (raidpack)
		 			rlistbox->AddString(GetDateName(raidpack->date * SECSPERDAY, DATE_LONG),0);
			}
 
 			//TIME! NOT raid
//DeadCode JIM 15Oct00 			char* raidletter="F%03i";
//DeadCode JIM 15Oct00 			rlistbox->AddString(GetTimeName(intercept->takeofftime),1);

	//DEADCODE RDH 15/05/00  		rlistbox->AddString(CSprintf("F%i", intercept->diaryraidindex),1);
 			
 			//size
 				rlistbox->AddString(CSprintf("%i",sqentry->noaclaunched),2);

 			//to
 			int t=intercept->takeofftime/60;
 			rlistbox->AddString(CSprintf("%02i:%02i",t/60,t%60),3);
 
 			//mission
 			int cnt = int(!intercept->waspatrolinitially);				//RJS 29Aug00
 			rlistbox->AddString(RESLIST(AM_PATROL, cnt),4);
 
 			//target
 			if(!intercept->interceptloc)
 				rlistbox->AddString(RESSTRING(DASH),5);
 			//tally
 			int kills = 0;
			for (int k = 0; k < 5; k++)
				kills += sqentry->kills[k];
 			rlistbox->AddString(CSprintf("+%i -%i", kills, sqdtlsptr[i]->numlosses),6);
		} 
 
 		i++;
 	}
 
	rlistbox->SetHilightRow(*currentptr+1);


}
Exemple #14
0
void	Geschwader::RefreshLW()
{
	CRListBox* rlistbox;
	rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL1);
	rlistbox->Clear();
	rlistbox->AddColumn(100);
	rlistbox->AddColumn(40);
	rlistbox->AddColumn(40);
	rlistbox->AddColumn(60);
	rlistbox->AddColumn(100);
	rlistbox->AddColumn(40);
	rlistbox->AddColumn(40);
	rlistbox->AddColumn(40);
	rlistbox->AddString(RESSTRING(LUFTFLOTTE2),0);
	rlistbox->AddString("I",1);
	rlistbox->AddString("II",2);
	rlistbox->AddString("III",3);
	rlistbox->AddString(RESSTRING(LUFTFLOTTE3),4);
	rlistbox->AddString("I",5);
	rlistbox->AddString("II",6);
	rlistbox->AddString("III",7);

	FindGeschwader();

	for(int flotte = 0; flotte <2;flotte++)
		for (int name = 0; name <MAX_GESCH; name++)
		
		{
			CString string;
			if(geschwaderarray[flotte][geschwadertype][name] != -1)
			{
				int wader = geschwaderarray[flotte][geschwadertype][name];
				int wadernum = 	Node_Data.geschwader[wader].wadernum;
 //CSprintf("%i",	wadernum)
				if (Node_Data.geschwader[wader].reconn)
					string =   CSprintf("%s%i<%s>",
									RESLIST(J, Node_Data.geschwader[wader].wadername),
									wadernum,
									RESLIST(SPIT_A,Node_Data.geschwader[wader].aircrafttype));
				else
					string =   CSprintf("%s%i(%s)",
									RESLIST(J, Node_Data.geschwader[wader].wadername),
									wadernum,
									RESLIST(SPIT_A,Node_Data.geschwader[wader].aircrafttype));
				rlistbox->AddString(string,flotte*4);
		
				int i = 0, numsquad = 0;
				int sq, w;
				while (Node_Data.gruppe[i].squadron != SQ_ZERO)
				{
				  sq = Node_Data.gruppe[i].squadron;
				  w =Node_Data.gruppe[i].wadernum;

				  if (Node_Data.gruppe[i].wadernum == wader)
				  {
						string = CSprintf("%i", Node_Data.gruppe[i].acavail);
						if (Node_Data.gruppe[i].periodsuntilready == Gruppen::BUSY_IN_EUROPE)
							rlistbox->AddString("",flotte*4+numsquad+1);
						else if (Node_Data.gruppe[i].periodsuntilready == 0)
					  		rlistbox->AddString(string,flotte*4+numsquad+1);
						else
					  		rlistbox->AddString(CSprintf("(%s)", string),flotte*4+numsquad+1);

						numsquad++;
				  }

				  i++;
				}


			}

		}			


}
Exemple #15
0
void LWTaskFighter::Refresh()
{
		CRStatic*   s;


	PackageList::AMType*	amtype;

	switch	(attackmethod)
	{
		case	Profile::AM_DETACHED:
		{
			amtype = &Todays_Packages.taskdata.detached;
			tab = 3;
			break;
		}
		case	Profile::AM_ATTACHED:
		{
			amtype = &Todays_Packages.taskdata.attached;
			tab = 2;
			break;
		}
		case	Profile::AM_RETURNESCORT:
		{
			amtype = &Todays_Packages.taskdata.returned;
			tab = 4;
			break;
		}
		default_neverreferenced; 
		
	}



	s=GETDLGITEM(IDC_RSTATICFIGHTERSALLOCATED);
	CString string = RESSTRING(AIRCRAFT);
	int acnum;
	if (amtype->acnum == 1)
		acnum = 1;
	else if (amtype->acnum > 1)
	{
		acnum = amtype->acnum;
		string = RESSTRING(AIRCRAFT_PLURAL);
	}else
	{
		acnum = amtype->squadnum;
		if (acnum < 2)
			string = RESSTRING(STAFFEL);
		else if (acnum <3)
			string = RESSTRING(L_STAFFELN);
		else if (acnum <6)
		{
			acnum = acnum/3;
			string = RESSTRING(GRUPPE);
		}else if (acnum <18)
		{
			acnum = acnum/3;
			string = RESSTRING(GRUPPEN);
		}else
		{
			acnum = acnum/9;
			string = RESSTRING(GESCHWADER);
		}
	}
	s->SetString(CSprintf("%i %s", acnum, string));








	CRCombo* combo;
	int form = (amtype->formtype & FORMTYPE_SQUAD)>>FORMTYPE_SQUAD_SH;
	if (form > 6) form = 6;
	if (form < 0) form = 0;
	combo=GETDLGITEM(IDC_RCOMBOFORMATION);
	combo->Clear()->RESCOMBO(AUTO,1)-> SetIndex(0);

//DeadCode JIM 14Nov00 	combo->Clear()->RESCOMBO(ECHELONL,7)-> SetIndex(form);


	  	combo=GETDLGITEM(IDC_RCOMBOUNITTYPE);
	combo->Clear()->RESCOMBO(GESCHWADER,3)->
					SetIndex(unitdisplaylevel);




	CRListBox* rlistbox;
	rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL1);
	rlistbox->Clear();
	rlistbox->AddColumn(120);
	rlistbox->AddColumn(TARGETFIELDWIDTH);										  //RDH 02/06/99
	rlistbox->AddColumn(80);
	rlistbox->AddString(RESSTRING(UNIT),0);
	rlistbox->AddString(RESSTRING(TARGET),1);
	rlistbox->AddString(RESSTRING(STATUS),2);

	
	if (attackmethod == Profile::AM_DETACHED)
	{
		GETDLGITEM(IDC_RSTATICCTRL00)->SetString(RESSTRING(L_CEILING));
 		GETDLGITEM(IDC_RSTATICCTRL01)->SetString(RESSTRING(LHIGH));
		GETDLGITEM(IDC_RSTATICCTRL02)->SetString(RESSTRING(FORWARDHIGH));
		GETDLGITEM(IDC_RSTATICCTRL03)->SetString(RESSTRING(FORWARD));
		GETDLGITEM(IDC_RSTATICCTRL04)->SetString(RESSTRING(FORWARDLOW));
		GETDLGITEM(IDC_RSTATICCTRL05)->SetString(RESSTRING(LATE));
	}else
	{
		GETDLGITEM(IDC_RSTATICCTRL00)->SetString(RESSTRING(BEHIND));
 		GETDLGITEM(IDC_RSTATICCTRL01)->SetString(RESSTRING(INFRONT));
		GETDLGITEM(IDC_RSTATICCTRL02)->SetString(RESSTRING(PORT));
		GETDLGITEM(IDC_RSTATICCTRL03)->SetString(RESSTRING(STARBOARD));
		GETDLGITEM(IDC_RSTATICCTRL04)->SetString(RESSTRING(ABOVE));
		GETDLGITEM(IDC_RSTATICCTRL05)->SetString(RESSTRING(BELOW));
	}

	{
		for (int i=1; i< PackageList::MAX_METHODS-1;i++)
		{
			CRButton* b = GETDLGITEM(IDC_TICK1+i-1);
			b->SetPressed(amtype->attackmethods[i]);
		}
	}


	

	
	Profile& pk = Todays_Packages.pack[Todays_Packages.hipack];

	CRButton* b = GETDLGITEM(IDC_STRAFTARGET);

//DEADCODE RDH 02/04/00 	straf = false;
//DEADCODE RDH 02/04/00 	for (int num=pk.squadlist.Max()-1;num>=0;num--)
//DEADCODE RDH 02/04/00 		if  (	((pk.squadlist[num].method&Profile::AM_GROUPMASK)==attackmethod)
//DEADCODE RDH 02/04/00 			&&	(pk.squadlist[num].submethod == Profile::SM_DOSTRAFFEGROUND)
//DEADCODE RDH 02/04/00 			)
//DEADCODE RDH 02/04/00 			straf = true;
//DEADCODE RDH 02/04/00 	b->SetPressed(straf);
//DEADCODE RDH 02/04/00 
	b->SetPressed(pk.StraffRequired(attackmethod));		

	int i=0;

//DEADCODE  15/02/00 	maxunits = 0;
//DEADCODE  15/02/00 	while (i < pk.squadlist)
//DEADCODE  15/02/00 	{
//DEADCODE  15/02/00 		int am = pk[i].method;
//DEADCODE  15/02/00 
//DEADCODE  15/02/00 		if (pk[i].method == attackmethod)
//DEADCODE  15/02/00 		{
//DEADCODE  15/02/00 			Squadron* sq = Node_Data[(SquadNum)pk[i].squadnum];
//DEADCODE  15/02/00  			CString name = sq->ShortName() + "/";
//DEADCODE  15/02/00 			name = name + sq->SubName();
//DEADCODE  15/02/00 			rlistbox->AddString(name,0);
//DEADCODE  15/02/00 			rlistbox->AddString(GetTargName(pk.packagetarget[pk[i].targetindex].currentid),1);
//DEADCODE  15/02/00 			rlistbox->AddString(RESLIST(PS_SPARE,pk.packagestatus),2);
//DEADCODE  15/02/00 			maxunits++;
//DEADCODE  15/02/00 		}
//DEADCODE  15/02/00 		i++;
//DEADCODE  15/02/00 	}

	FillList();
	if ((UnitList[0] >= 0)	&&	(maxunits > 0))
	{
		i = 0;
		UByte		gruppennum;
		Gruppen* sq = Node_Data[(SquadNum)pk[UnitList[0]].squadnum];
 		gruppennum = (SquadNum)pk[UnitList[0]].squadnum;
		int staffel = 0;

		while (i < maxunits)
		{
			Gruppen* sq = Node_Data[(SquadNum)pk[UnitList[i]].squadnum];
			CString name = sq->ShortName();
			if (unitdisplaylevel != PackageList::DISPLAY_GESCHWADER)
			{
				name =   name + "/" + sq->SubName();
			}

			if (unitdisplaylevel == PackageList::DISPLAY_STAFFEL)
			{
				if (gruppennum == (SquadNum)pk[UnitList[i]].squadnum)
					staffel++;
				else
				{
					gruppennum = (SquadNum)pk[UnitList[i]].squadnum;
					staffel =1;
				}
				name = name + CSprintf(" (%i)", staffel + (sq->gruppennum*3));
			}
			rlistbox->AddString(name,0);
			int ti=pk[UnitList[i]].targetindex;
			if (ti<0)
				ti=0;
			rlistbox->AddString(GetTargName(pk.packagetarget[ti].currentid),1);
			rlistbox->AddString(RESLIST(PS_SPARE,pk.packagestatus),2);
			i++;
		}
	}
	int maxsquad = Todays_Packages.SquadronsPlanned(NAT_LUF);
	if	(	(Todays_Packages.taskdata.attached.maxac != -1)
			||
			(
			 (maxsquad < 93)
			)
		)
		rlistbox->AddString(RESSTRING(NEXTAVAILABLE),0);

}
Exemple #16
0
BOOL CCareer::OnInitDialog() 
{
	CDialog::OnInitDialog();
//	CRSpinBut* spinbut;
//	spinbut=GetDlgItem(IDC_RSPINBUTCTRL2);
//	spinbut->AddString("1");
//	spinbut->AddString("2");
//	spinbut->AddString("3");
//	spinbut->AddString("4");
//	spinbut->AddString("5");
	
	if (m_IDCX_NAME.m_hWnd)
	{
		if	(RFullPanelDial::incomms)
		{
			m_IDCX_NAME.SetWindowText(DPlay::H2H_Player[0].name);
			m_IDCX_NAME.SetReadOnly(TRUE);
		}
		else
		{
			m_IDCX_NAME.SetWindowText(MMC.PlayerName);
			m_IDCX_NAME.SetReadOnly(FALSE);
			m_IDCX_NAME.SetLimitText(PLAYERNAMELEN-1);
		}
	}
	else
	{
		CREdit* editbox;
		editbox=GETDLGITEM(IDC_NAME);
		if	(RFullPanelDial::incomms)
		{
			editbox->SetCaption(DPlay::H2H_Player[0].name);
			editbox->SetEnabled(false);
		}else
		{
			editbox->SetCaption(MMC.PlayerName);
			editbox->SetEnabled(true);
			editbox->SetFocus();
		}
	}
	CRListBox* rlistbox;
	rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL1);
	rlistbox->Clear();
	rlistbox->AddColumn(60);
	rlistbox->AddColumn(60);
	rlistbox->AddColumn(60);
	rlistbox->AddColumn(60);
	rlistbox->AddColumn(2);


	CString string;

	string.LoadString(IDS_L_SQ_BF_F86A);
	rlistbox->AddString(string,0);

	string.LoadString(IDS_L_SQ_BF_F86A);
	rlistbox->AddString(string,0);

	string.LoadString(IDS_SQ_BF_F86B);
	rlistbox->AddString(string,0);

	string.LoadString(IDS_F80);
	rlistbox->AddString(string,0);

	string.LoadString(IDS_F84);
	rlistbox->AddString(string,0);

	string.LoadString(IDS_F51);
	rlistbox->AddString(string,0);

	string.LoadString(IDS_ALL);
	rlistbox->AddString(string,0);

	string.LoadString(IDS_SORTIES);
	rlistbox->AddString(string,1);

	string.LoadString(IDS_COMBATS);
	rlistbox->AddString(string,2);

	string.LoadString(IDS_KILLS);
	rlistbox->AddString(string,3);

	string.LoadString(IDS_PILOT_LOSSES);
	rlistbox->AddString(string,4);

	//sum to get all column
	for (Debrief::PlayerTypes i = Debrief::SORTIES; i <= Debrief::LOSSES; i++)
	{
		int kills = 0;
		for (SquadSelect j = SQ_F86A; j < (SQ_B_NONFLYABLE); j++)
		{
			kills += MMC.debrief.playertotals[j][i];
		}
		MMC.debrief.playertotals[SQ_B_NONFLYABLE][i] = kills;
	}


	  
	for ( i = Debrief::SORTIES; i <= Debrief::LOSSES; i++)
	{
		for (SquadSelect j = SQ_F86A; j < (SQ_B_NONFLYABLE+1); j++)
		{
			int kill = MMC.debrief.playertotals[j][i];
			rlistbox->AddString(CSprintf("%i",kill),i+1);
		}
	}



	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}