Пример #1
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);
	}

}
Пример #2
0
void PilotLogBook::LWRefreshList()
{
	
	CRListBox* rlistbox;
	rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL1);
//DeadCode RDH 31Oct00 	rlistbox->AddString("",0);
	rlistbox->Clear();
	//rlistbox->AddColumn(70);
	//rlistbox->AddColumn(60);										  //RDH 02/06/99
	//rlistbox->AddColumn(80);										  //RDH 02/06/99
	//rlistbox->AddColumn(90);										  //RDH 02/06/99
	//rlistbox->AddColumn(280);
	//rlistbox->AddColumn(45);										  //RDH 02/06/99
//DeadCode JIM 18Oct00 	rlistbox->AddColumn(30);										  //RDH 02/06/99
	rlistbox->AddString(RESSTRING(DATE),0);
	rlistbox->AddString(RESSTRING(HOUR),1);
	rlistbox->AddString(RESSTRING(ACTYPE),2);
	rlistbox->AddString(RESSTRING(DUTY),3);
	rlistbox->AddString(RESSTRING(REMARKS),4);
	rlistbox->AddString(RESSTRING(CLAIMS),5);
//DeadCode JIM 18Oct00 	rlistbox->AddString(RESSTRING(FLYINGHOURS),6);

	Diary::Player*	pptr;


//TEMPCODE RDH 05/04/00 	//###temp
//TEMPCODE RDH 05/04/00 	int pack=0;
//TEMPCODE RDH 05/04/00 	while (	pack < Profile::MAX_PACKS)
//TEMPCODE RDH 05/04/00 	{
//TEMPCODE RDH 05/04/00 		if (Todays_Packages.pack[pack].packagestatus!=Profile::PS_SPARE)
//TEMPCODE RDH 05/04/00 		{
//TEMPCODE RDH 05/04/00 		 	Profile& pk = Todays_Packages.pack[pack];
//TEMPCODE RDH 05/04/00 			if  (pk.attackmethod >= Profile::AM_LWPACKS)
//TEMPCODE RDH 05/04/00 				break;
//TEMPCODE RDH 05/04/00 		}
//TEMPCODE RDH 05/04/00 		pack++;
//TEMPCODE RDH 05/04/00 	}
//TEMPCODE RDH 05/04/00 	RDialog::m_pView->SetHiLightInfo(pack, 0,UID_Null);
//TEMPCODE RDH 05/04/00 
//TEMPCODE RDH 05/04/00 	if (Todays_Packages[pack][0].diaryentry == -1)		//RJS 27Jan00
//TEMPCODE RDH 05/04/00 			Squad_Diary.CreateEntry(Todays_Packages,pack);	//RJS 27Jan00
//TEMPCODE RDH 05/04/00 
//TEMPCODE RDH 05/04/00 	Squad_Diary.CreatePlayer(Todays_Packages);					//RJS 27Jan00
//TEMPCODE RDH 05/04/00 	pptr = Squad_Diary.GetFirstPlayer();
//TEMPCODE RDH 05/04/00 	pptr->howendedmission = EFS_LandedOK;
//TEMPCODE RDH 05/04/00 	//###end temp

	pptr = Squad_Diary.GetFirstPlayer();


	while(pptr)	
	{
		SquadronBase*	squad =	Squad_Diary.GetSquadron(pptr);
		if (squad)
		{
			Diary::RaidGroup* raidgroup;
			Diary::RaidPack* raidpack;
			raidgroup = Squad_Diary.GetRaidGroup(squad);
			if (raidgroup)
			{
				raidpack = Squad_Diary.GetRaidPack(raidgroup);
				if (raidpack)
				{
					//date
		 			rlistbox->AddString(GetDateName(raidpack->date * SECSPERDAY, DATE_LONG),0);
					int t=raidgroup->targettime/60;
 					rlistbox->AddString(CSprintf("%02i:%02i",t/60,t%60),1);

					Squadron* sq  = Node_Data[(SquadNum)squad->squadnum];
					rlistbox->AddString(RESLIST(SPIT_A, sq->AcType()),2);

					rlistbox->AddString(RESLIST(MT_RAID, raidgroup->misstype),3);

					CString	remarkstring;								//RJS 9Nov00
																		//RJS 9Nov00
					pptr->DamageReport(remarkstring);					//RJS 9Nov00
																		//RJS 9Nov00
					rlistbox->AddString(remarkstring,4);				//RJS 9Nov00

//DeadCode RJS 9Nov00 					bool acdamage = false;
//DeadCode RJS 9Nov00 					int maxdam = 0, maxdamtype;
//DeadCode RJS 9Nov00 					for(int i = 0; i < DIARY_MAXDAMAGE; i++)
//DeadCode RJS 9Nov00 						if (pptr->specificdamage[i] >50)
//DeadCode RJS 9Nov00 						{
//DeadCode RJS 9Nov00 							acdamage = true;
//DeadCode RJS 9Nov00 							if (pptr->specificdamage[i] > maxdam)
//DeadCode RJS 9Nov00 							{
//DeadCode RJS 9Nov00 								maxdam = pptr->specificdamage[i];
//DeadCode RJS 9Nov00 								maxdamtype = i;
//DeadCode RJS 9Nov00 							}
//DeadCode RJS 9Nov00 						}
//DeadCode RJS 9Nov00 
//DeadCode RJS 9Nov00 					if (	acdamage									//RJS 9Nov00
//DeadCode RJS 9Nov00 						&&	(pptr->howendedmission < EFS_BadCrashAF)	)	//RJS 9Nov00
//DeadCode RJS 9Nov00 					{
//DeadCode RJS 9Nov00 						if (maxdam < 200)
//DeadCode RJS 9Nov00 							rlistbox->AddString(RESLIST(DIARYDAM_LEFTWING, maxdamtype),4);	//RJS 9Nov00
//DeadCode RJS 9Nov00 						else
//DeadCode RJS 9Nov00 							rlistbox->AddString(RESLIST(DIARYDEST_LEFTWING, maxdamtype),4);	//RJS 9Nov00
//DeadCode RJS 9Nov00 
//DeadCode RJS 9Nov00 					}else
//DeadCode RJS 9Nov00 						rlistbox->AddString(RESLIST(EFS_NULL, pptr->howendedmission),4);


					int kills = pptr->kills[0] + pptr->kills[1];
 					rlistbox->AddString(CSprintf("%i", kills),5);
 
 
				}
			}
 

		}
		pptr = Squad_Diary.GetNextPlayerAll(pptr);



	}

}
Пример #3
0
/////////////////////////////////////////////////////////////////////////////
// PilotLogBook message handlers
void PilotLogBook::RAFRefreshList()
{
		CRListBox* rlistbox;
	rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL1);
//DeadCode RDH 31Oct00 	rlistbox->AddString("",0);
	rlistbox->Clear();
	//rlistbox->AddColumn(70);            //MIKE
	//rlistbox->AddColumn(60);										  //RDH 02/06/99
	//rlistbox->AddColumn(80);										  //RDH 02/06/99
	//rlistbox->AddColumn(90);										  //RDH 02/06/99
	//rlistbox->AddColumn(280);
	//rlistbox->AddColumn(45);										  //RDH 02/06/99
//DeadCode JIM 18Oct00 	rlistbox->AddColumn(30);										  //RDH 02/06/99
	rlistbox->AddString(RESSTRING(DATE),0);
	rlistbox->AddString(RESSTRING(HOUR),1);
	rlistbox->AddString(RESSTRING(ACTYPE),2);
	rlistbox->AddString(RESSTRING(DUTY),3);
	rlistbox->AddString(RESSTRING(REMARKS),4);
	rlistbox->AddString(RESSTRING(CLAIMS),5);
//DeadCode JIM 18Oct00 	rlistbox->AddString(RESSTRING(FLYINGHOURS),6);

	Diary::Player*	pptr;
//TEMPCODE RDH 05/04/00 	//###temp
//TEMPCODE RDH 05/04/00 	int pack=0;
//TEMPCODE RDH 05/04/00 	while (	pack < Profile::MAX_PACKS)
//TEMPCODE RDH 05/04/00 	{
//TEMPCODE RDH 05/04/00 		if (Todays_Packages.pack[pack].packagestatus!=Profile::PS_SPARE)
//TEMPCODE RDH 05/04/00 		{
//TEMPCODE RDH 05/04/00 		 	Profile& pk = Todays_Packages.pack[pack];
//TEMPCODE RDH 05/04/00 			if  (pk.attackmethod < Profile::AM_LWPACKS)
//TEMPCODE RDH 05/04/00 				break;
//TEMPCODE RDH 05/04/00 		}
//TEMPCODE RDH 05/04/00 		pack++;
//TEMPCODE RDH 05/04/00 	}
//TEMPCODE RDH 05/04/00 	RDialog::m_pView->SetHiLightInfo(pack, 0,UID_Null);
//TEMPCODE RDH 05/04/00 
//TEMPCODE RDH 05/04/00 	if (Todays_Packages[pack][0].diaryentry == -1)		//RJS 27Jan00
//TEMPCODE RDH 05/04/00 			Squad_Diary.CreateEntry(Todays_Packages,pack);	//RJS 27Jan00
//TEMPCODE RDH 05/04/00 
//TEMPCODE RDH 05/04/00 	Squad_Diary.CreatePlayer(Todays_Packages);					//RJS 27Jan00
//TEMPCODE RDH 05/04/00 	pptr = Squad_Diary.GetFirstPlayer();
//TEMPCODE RDH 05/04/00 	pptr->howendedmission = EFS_LandedOK;
//TEMPCODE RDH 05/04/00 	//###end temp

	pptr = Squad_Diary.GetFirstPlayer();


	while(pptr)	
	{
		SquadronBase*	squad =	Squad_Diary.GetSquadron(pptr);
		if (squad)
		{
			Diary::RaidGroup* raidgroup;
			Diary::RaidPack* raidpack;
			Diary::Intercept* intercept;

			intercept = Squad_Diary.GetIntercept(squad);
			raidgroup = Squad_Diary.GetRaidGroup(intercept);
			if (raidgroup)
			{
				raidpack = Squad_Diary.GetRaidPack(raidgroup);
				if (raidpack)
				{
					//date
		 			rlistbox->AddString(GetDateName(raidpack->date * SECSPERDAY, DATE_LONG),0);

					int	t;												//RJS 12Nov00
					if (intercept->intercepttime)						//RJS 12Nov00
						t = intercept->intercepttime;					//RJS 12Nov00
					else												//RJS 12Nov00
						t = intercept->takeofftime;						//RJS 12Nov00

					t /= 60;											//RJS 12Nov00

					rlistbox->AddString(CSprintf("%02i:%02i",t/60,t%60),1);

					Squadron* sq  = Node_Data[(SquadNum)squad->squadnum];
					rlistbox->AddString(RESLIST(SPIT_A, sq->AcType()),2);

					//mission
 					int cnt = int(!intercept->waspatrolinitially);
					rlistbox->AddString(RESLIST(AM_PATROL, cnt),3);

					CString	remarkstring;								//RJS 9Nov00
																		//RJS 9Nov00
					pptr->DamageReport(remarkstring);					//RJS 9Nov00
																		//RJS 9Nov00
					rlistbox->AddString(remarkstring,4);				//RJS 9Nov00


 					int kills = 0;
					for (int k = 0; k < 6; k++)
							kills += pptr->kills[k];
 					rlistbox->AddString(CSprintf("%i", kills),5);
 
 
				}
			}
 

		}
		pptr = Squad_Diary.GetNextPlayerAll(pptr);



	}


}
Пример #4
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();
}
Пример #5
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
}
Пример #6
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);


}