コード例 #1
0
ファイル: lwdiaryd.cpp プロジェクト: xor2003/bob-flight-sim
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();
}
コード例 #2
0
ファイル: WEATHER.CPP プロジェクト: gondur/BOB_Src
BOOL CWeather::OnInitDialog() 
{
	CDialog::OnInitDialog();
//DeadCode JIM 20Oct00 	RDialog* parent=(RDialog*)GetParent();
//	parent->SetMaxSize(CRect(0,0,350,430));
//	parent->SetMinSize(CRect(0,0,150,150));
	if (!Node_Data.GotBadWeatherPeriod())
	{
		CRStatic*   s;
		bool layerpresent = false;
		int index = 0;
		SLong lowalt = 0x7ffffff;
		for (int i =0; i < 3; i++)
		{
			if (MMC.Sky.Layer[i].Cover >= 32)
			{
				layerpresent = true;
				s=GETDLGITEM(IDC_CLOUD_0+index);
				index ++;
				if (MMC.Sky.Layer[i].AltBase < lowalt)
					lowalt = MMC.Sky.Layer[i].AltBase;
				int alt= (MMC.Sky.Layer[i].AltBase*10)/Save_Data.alt.mediummm;
				alt = 100*((alt + 50)/100);

				s->SetString(CSprintf("%i%s (%i/8)", 
						alt,LoadResString(Save_Data.alt.mediumabbr), MMC.Sky.Layer[i].Cover/32));
			}
		}
		if (!layerpresent)
		{
			s=GETDLGITEM(IDC_CLOUD_0);
			s->SetString(RESSTRING(NONE));
			index ++;
		}
		for (index; index < 3; index++)
		{
			s=GETDLGITEM(IDC_CLOUD_0+index);

			s->SetString("");
		}

		

 		s=GETDLGITEM(IDC_CONDITIONS);
		if (layerpresent)
		{
			if ( lowalt < FT_5000)
				s->SetString(RESSTRING(OVERCAST));
			else if ( lowalt < FT_10000)
				s->SetString(RESSTRING(LOWCLOUD));
			else
				s->SetString(RESSTRING(CLOUDY));

		}else
		{
			if (MMC.Sky.FluffyCloud.Cover > 32)
				s->SetString(RESSTRING(PATCHYCLOUD));
			else
				s->SetString(RESSTRING(L_CLEAR));
		}
	//DEADCODE RDH 25/02/00 
	//DEADCODE RDH 25/02/00 	s=GETDLGITEM(IDC_SPECIALNOTES);
	//DEADCODE RDH 25/02/00 	if (MMC.Sky.MistInValley)
	//DEADCODE RDH 25/02/00 		s->SetString(RESSTRING(MISTINVALLEYS));
	//DEADCODE RDH 25/02/00 	else
	//DEADCODE RDH 25/02/00   		s->SetString(RESSTRING(NONE_SPECIALS));



		s=GETDLGITEM(IDC_GUSTS);
		int mag = MMC.Sky.MaxMagnitude;
		if (mag > 2)
			mag = 2;
		s->SetString(RESLIST(LIGHT,mag));

	//DEADCODE RDH 25/02/00 	s=GETDLGITEM(IDC_VISIBILITY);
	//DEADCODE RDH 25/02/00 	int v = 0.5 + MMC.Sky.Visibility/(30.48*6080);
	//DEADCODE RDH 25/02/00 	s->SetString(CSprintf("%i", v));

		s=GETDLGITEM(IDC_TEMPERATURE);
		int t = MMC.Sky.Temp0 - 272.65;
		s->SetString(CSprintf("%i", t));

		s=GETDLGITEM(IDC_PRESSURE);
		int p = (MMC.Sky.Press0 + 0.5);
		s->SetString(CSprintf("%i", p));



	//DEADCODE RDH 25/02/00 	s=GETDLGITEM(IDC_CONTRAIL_BASE);
	//DEADCODE RDH 25/02/00 	t = MMC.Sky.ContrailBandCentre - MMC.Sky.ContrailBandWidth/2;
	//DEADCODE RDH 25/02/00 	t = t/30.48;
	//DEADCODE RDH 25/02/00 	s->SetString(CSprintf("%i", t));
	//DEADCODE RDH 25/02/00 
	//DEADCODE RDH 25/02/00 	s=GETDLGITEM(IDC_CONTRAIL_TOP);
	//DEADCODE RDH 25/02/00 	t = MMC.Sky.ContrailBandCentre + MMC.Sky.ContrailBandWidth/2;
	//DEADCODE RDH 25/02/00 	t = t/30.48;
	//DEADCODE RDH 25/02/00 	s->SetString(CSprintf("%i", t));

		s=GETDLGITEM(IDC_WINDSPEED0);
		t = MMC.Sky.wind0;
		s->SetString(CSprintf("%i", t));

		s=GETDLGITEM(IDC_WINDDIRECTION0);
		t = MMC.Sky.dir0;
		s->SetString(CSprintf("%i", t));

		s=GETDLGITEM(IDC_WINDSPEED1);
		t = MMC.Sky.windalt;
		s->SetString(CSprintf("%i", t));

		s=GETDLGITEM(IDC_WINDDIRECTION1);
		t = MMC.Sky.diralt;
		s->SetString(CSprintf("%i", t));

	}
	else
	{
 
		GETDLGITEM(IDC_CLOUD_0)->SetString(CSprintf("%i%s (%i/8)", 
						1000,LoadResString(Save_Data.alt.mediumabbr), 7));

		for (int index=1; index < 3; index++)
		{
			GETDLGITEM(IDC_CLOUD_0+index)->SetString("");
		}
 		GETDLGITEM(IDC_CONDITIONS)->SetString(RESSTRING(OVERCAST));
		GETDLGITEM(IDC_GUSTS)->SetString(RESLIST(LIGHT,2));
		GETDLGITEM(IDC_TEMPERATURE)->SetString(CSprintf("%i", 10));

		GETDLGITEM(IDC_PRESSURE)->SetString(CSprintf("%i", 970));
		GETDLGITEM(IDC_WINDSPEED0)->SetString(CSprintf("%i", 25));

		GETDLGITEM(IDC_WINDDIRECTION0)->SetString(CSprintf("%i", MMC.Sky.dir0));

		GETDLGITEM(IDC_WINDSPEED1)->SetString(CSprintf("%i", 45));

		GETDLGITEM(IDC_WINDDIRECTION1)->SetString(CSprintf("%i", MMC.Sky.diralt));

	}





//	CRect rect;
//	parent->GetParent()->GetWindowRect(rect);
//	GetClientRect(rect);

//	parent->SetMaxSize(CRect(0,0,rect.Width(),rect.Height()));
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
コード例 #3
0
ファイル: RIP_LIST.CPP プロジェクト: gondur/mig_src
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
}
コード例 #4
0
ファイル: afdetl.cpp プロジェクト: xor2003/bob-flight-sim
BOOL AirfieldDetails::OnInitDialog() 
{
	CDialog::OnInitDialog();
	

	TargetFighterField* af;
	af = Node_Data[afuid];

	CRStatic*   s;
	s= GETDLGITEM(IDC_RSTATICSECTOROPS);
 	TargetSectorField*	sectorfield = af->getsectoraf();
	UniqueID  uid = sectorfield->primarycontrolcentre;

	TargetGroup* sector;
	sector = Node_Data[uid];
	if ((sector) && (sector->truestatus >= Target::TS_DESTROYED))
		uid = sectorfield->secondarycontrolcentre;

	s->SetString(GetTargName(uid));

	UByte damage;
	s= GETDLGITEM(IDC_RSTATICREFUEL);
	
	damage = af->subdamagelevels[TargetFighterField::SDL_FUEL];
	damage = damage/25;
	if (damage >3)
		damage = 3;
#ifndef	NDEBUG
	#define SHOWNUMDEBUG(val)	+CSprintf(" (%i%%)",val)
#else
	#define SHOWNUMDEBUG(val)
#endif

	s->SetString(RESLIST(UNDAMAGED,damage) SHOWNUMDEBUG(af->subdamagelevels[TargetFighterField::SDL_FUEL]));

	s= GETDLGITEM(IDC_RSTATICREPAIR);
	damage = af->subdamagelevels[TargetFighterField::SDL_REPAIR];
	damage = damage/25;
	if (damage >3)
		damage = 3;
	s->SetString(RESLIST(UNDAMAGED,damage) SHOWNUMDEBUG(af->subdamagelevels[TargetFighterField::SDL_REPAIR]));

	s= GETDLGITEM(IDC_RSTATICFIELD);
	damage = af->subdamagelevels[TargetFighterField::SDL_RUNWAY];
	damage = damage/25;
	if (damage >3)
		damage = 3;
	s->SetString(RESLIST(UNDAMAGED,damage) SHOWNUMDEBUG(af->subdamagelevels[TargetFighterField::SDL_RUNWAY]));


	s= GETDLGITEM(IDC_RSTATICSTAFF);
	damage = af->subdamagelevels[TargetFighterField::SDL_STAFF];
	damage = damage/25;
	if (damage >3)
		damage = 3;
	s->SetString(RESLIST(UNDAMAGED,damage) SHOWNUMDEBUG(af->subdamagelevels[TargetFighterField::SDL_STAFF]));

//DeadCode JIM 20Oct00 	int ac = 16;
	s= GETDLGITEM(IDC_RSTATICMAXSQUAD);

	s->SetString(CSprintf("%i", af->maxsquads));

	int k=0, spitsq = 0, hurrsq = 0;
	while (Node_Data.squadron[k].squadron != SQ_ZERO)
	{
 		if (Node_Data.squadron[k].homeairfield == afuid)
		{
			BritSquadron* sq = Node_Data.squadron[k];
			PlaneTypeSelect type = sq->AcType();
			if (		(type == PT_SPIT_A)
					||	(type == PT_SPIT_B)
			   )
				spitsq++;
			else
				hurrsq++;
		}
		k++;
	}


 	s= GETDLGITEM(IDC_RSTATICSPITSQUAD);
	s->SetString(CSprintf("%i", spitsq));
	s= GETDLGITEM(IDC_RSTATICHURRSQUAD);
	s->SetString(CSprintf("%i", hurrsq));
	
	CString notes="";
	for (int pack = Profile::MAX_PACKS-1,lines=3;lines>0 && pack>=0;pack--)
	{
		if (Todays_Packages.pack[pack].packagestatus!=Profile::PS_SPARE)
		{
		 	Profile *pk = &Todays_Packages.pack[pack];
			bool	packfound;
			if (pk->raidnumentries[0].raidnum)
			for(int targetnum = 0;(pk->packagetarget[targetnum].currentid);targetnum++	)
			{
				packfound=false;
				if (pk->packagetarget[targetnum].currentid == afuid)
					packfound=true;
				else
					if (pk->packagetarget[targetnum].currentid <= SagBANDEND)
					{
						int tp,ts;
						if (Todays_Packages.GetACSquadEntry(pk->packagetarget[targetnum].currentid,tp,ts))
							if (Todays_Packages[tp].SquadTarget(ts)==afuid)
								packfound=true;
					}
				if (packfound)
				{
					notes=CString("   ")+ RESLIST(AM_PATROL,pk->attackmethod)+":    "+RESLIST(PS_SPARE,pk->packagestatus)+"\n"+notes;
					lines--;
				}

			}
		}
		
	}
	s= GETDLGITEM(IDC_DOSSNOTES);
#ifndef	NDEBUG
	notes+=CSprintf("Damage Levels: True: %i%% LWIntel: %i%%\n",af->truestatus,af->knownstatus);
#endif
	if (notes!="")
		s->SetString(RESSTRING(MISSIONS)+":\n"+notes);
	else
		s->SetString(notes);

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
コード例 #5
0
ファイル: lwtaskfr.cpp プロジェクト: xor2003/bob-flight-sim
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);

}
コード例 #6
0
ファイル: totesect.cpp プロジェクト: xor2003/bob-flight-sim
void ToteSector::RefreshLights()
{
  
	CRect parentpos(1,1,0,0);
	GetWindowRect(parentpos);
	parentpos.top=1;
	CPoint parentoff(-parentpos.left,parentpos.top);
	
	
	enum{MAXSQUAD = 4, MAXAIRFIELDS = 10};
	SquadNum	squad[MAXSQUAD];
	UniqueID	Airfields[MAXAIRFIELDS];
	TargetFighterField* af = Node_Data[sectoraf];

	int m = 0;
	Airfields[m++] = sectoraf;
	while (		((af = af->nextsatelite())!= NULL)
				&&	(m < MAXAIRFIELDS)
		  )
	   Airfields[m++]= af->uid;
	while	(m < MAXAIRFIELDS)
		Airfields[m++]= UID_Null;

	int j=0, k = 0;
	m = 0;
	while (Node_Data.squadron[k].squadron != SQ_ZERO)
	{
		for (m = 0; m < MAXAIRFIELDS; m++)
		{
			if (Node_Data.squadron[k].homeairfield == Airfields[m])
			{
			  squad[j++] = Node_Data.squadron[k].squadron;
			}
		}
	  k++;
	}




	BritSquadron* sq;
	int  i =0;
	CRButton* bb;
	CRButton* bw;
	CRStatic*   sn;
	CRStatic*   sp;
	CRStatic*   sa;

	while (i < 5)
	{
		switch(i)
		{
			default_neverreferenced;
			case 0:
			{
				bw = GETDLGITEM(IDC_RBUTTON_W0);
				bb = GETDLGITEM(IDC_RBUTTON_B0);
				sn=GETDLGITEM(IDC_RSTATICSQ0);
				sp=GETDLGITEM(IDC_RSTATIC_PLT0);
				sa=GETDLGITEM(IDC_RSTATIC_AC0);
				break;
			}
			case 1:
			{
				bw = GETDLGITEM(IDC_RBUTTON_W1);
				bb = GETDLGITEM(IDC_RBUTTON_B1);
				sn=GETDLGITEM(IDC_RSTATICSQ1);
				sp=GETDLGITEM(IDC_RSTATIC_PLT1);
				sa=GETDLGITEM(IDC_RSTATIC_AC1);
				break;
			}
			case 2:
			{
				bw = GETDLGITEM(IDC_RBUTTON_W2);
				bb = GETDLGITEM(IDC_RBUTTON_B2);
				sn=GETDLGITEM(IDC_RSTATICSQ2);
				sp=GETDLGITEM(IDC_RSTATIC_PLT2);
				sa=GETDLGITEM(IDC_RSTATIC_AC2);
				break;
			}
			case 3:
			{
				bw = GETDLGITEM(IDC_RBUTTON_W3);
				bb = GETDLGITEM(IDC_RBUTTON_B3);
				sn=GETDLGITEM(IDC_RSTATICSQ3);
				sp=GETDLGITEM(IDC_RSTATIC_PLT3);
				sa=GETDLGITEM(IDC_RSTATIC_AC3);
				break;
			}
			case 4:
			{
				bw = GETDLGITEM(IDC_RBUTTON_W4);
				bb = GETDLGITEM(IDC_RBUTTON_B4);
				sn=GETDLGITEM(IDC_RSTATICSQ4);
				sp=GETDLGITEM(IDC_RSTATIC_PLT4);
				sa=GETDLGITEM(IDC_RSTATIC_AC4);
				break;
			}


		}

				if (i<j)
				{
					sq = Node_Data[squad[i]];

					sn->SetString(sq->SubName());
			
					sp->SetString(CSprintf("%i", sq->pilotsavail));

					sa->SetString(CSprintf("%i", sq->acavail));
				

					bw->ShowWindow(true);
					bb->ShowWindow(true);

					CRect dlistpos;
					bw->GetWindowRect(dlistpos);

					int status = sq->totestatus;
					int index = readinesslevel[status];
					if (index < 9)
						index = 76+ index *28;
					else
						index = 392 + ((index - 9) * 28);
					parentoff.y=parentpos.top+(index)-dlistpos.top;

					SLong hr, mins;
					hr = MMC.currtime / SECSPERHR;
					mins = ((MMC.currtime- (SECSPERHR * hr)) / SECSPERMIN);
					SWord ind = mins %15;
					ind = ind /5;
					ind = 3 - ind;
					if (sq->totestatus<Profile::PS_PLANNED)
					{
						int max=sq->acavail;
						if (max>sq->pilotsavail)
							max=sq->pilotsavail;
						if (max>15)
							max=15;
						max=max/3;
						dlistpos.right=dlistpos.left+(max*10);
						ind=0;
					}
					else
					{
						int availbits=sq->usedacbits;
						int avail = Bit_Count_Nibble[availbits&15];
						avail += Bit_Count_Nibble[(availbits>>4)&15];
						avail += Bit_Count_Nibble[(availbits>>8)&15];
						avail/=3;
						dlistpos.right=dlistpos.left+(avail*10);

					}
					dlistpos+=parentoff;
					bw->MoveWindow(dlistpos);
					
					bb->GetWindowRect(dlistpos);

					bb->SetNormalFileNum(ICON_BTOTE+ind-1);
					parentoff.y=parentpos.top+316+(ind*14)-dlistpos.top;
					dlistpos+=parentoff;
					bb->MoveWindow(dlistpos);
				}else
				{
コード例 #7
0
ファイル: lwtasksm.cpp プロジェクト: xor2003/bob-flight-sim
void LWTaskSummary::Refresh()
{
//DeadCode JIM 30Oct00 	MakeFighterSpinLists(false);
	CRSpinBut* spinbut;
//DEADCODE RDH 12/01/00 	spinbut=GETDLGITEM(IDC_RSPINBUT_TARGETS);
//DEADCODE RDH 12/01/00 	spinbut->Clear()->MakeNumList(10,1,1)->SetIndex(Todays_Packages.taskdata.targetnum-1);
//DEADCODE RDH 12/01/00  
//DEADCODE RDH 12/01/00 	spinbut=GETDLGITEM(IDC_RSPINBUT_PERCENTFIGHTERS);
//DEADCODE RDH 12/01/00 	int fighters = Todays_Packages.taskdata.acttached_no + Todays_Packages.taskdata.detached_no;
//DEADCODE RDH 12/01/00 	int percent =  fighters/(fighters+Todays_Packages.taskdata.strike_no);
//DEADCODE RDH 12/01/00 	spinbut->Clear()->MakeNumList(100,0,1)->SetIndex(percent);

	CRStatic*   s;
	s=GETDLGITEM(IDC_TARGETS);
	s->SetString(CSprintf("%i",	Todays_Packages.taskdata.targetnum));

	int fighters = Todays_Packages.taskdata.totalfighter.acnum;
	int fightersquads = Todays_Packages.taskdata.totalfighter.squadnum;
//DEADCODE RDH 24/03/00 	bool squads = false;
//DEADCODE RDH 24/03/00 		
//DEADCODE RDH 24/03/00 	if (Todays_Packages.taskdata.returned.acnum == -1)
//DEADCODE RDH 24/03/00 	{
//DEADCODE RDH 24/03/00 		fightersquads +=Todays_Packages.taskdata.returned.squadnum;
//DEADCODE RDH 24/03/00 		squads = true;
//DEADCODE RDH 24/03/00 	}else
//DEADCODE RDH 24/03/00 		fighters +=Todays_Packages.taskdata.returned.acnum;
//DEADCODE RDH 24/03/00 
//DEADCODE RDH 24/03/00 	if (Todays_Packages.taskdata.attached.acnum == -1)
//DEADCODE RDH 24/03/00 	{
//DEADCODE RDH 24/03/00 		fightersquads +=Todays_Packages.taskdata.attached.squadnum;
//DEADCODE RDH 24/03/00 		squads = true;
//DEADCODE RDH 24/03/00 	}else
//DEADCODE RDH 24/03/00 		fighters +=Todays_Packages.taskdata.attached.acnum;
//DEADCODE RDH 24/03/00 
//DEADCODE RDH 24/03/00 	if (Todays_Packages.taskdata.detached.acnum == -1)
//DEADCODE RDH 24/03/00 	{
//DEADCODE RDH 24/03/00 		fightersquads +=Todays_Packages.taskdata.detached.squadnum;
//DEADCODE RDH 24/03/00 		squads = true;
//DEADCODE RDH 24/03/00 	}else
//DEADCODE RDH 24/03/00 		fighters +=Todays_Packages.taskdata.detached.acnum;
//DEADCODE RDH 24/03/00 
//DEADCODE RDH 24/03/00 	if (squads)
//DEADCODE RDH 24/03/00 	{
//DEADCODE RDH 24/03/00 		fighters = -1;
//DEADCODE RDH 24/03/00 		if (Todays_Packages.taskdata.returned.acnum > 0)
//DEADCODE RDH 24/03/00 			fightersquads ++;
//DEADCODE RDH 24/03/00 
//DEADCODE RDH 24/03/00 		if (Todays_Packages.taskdata.attached.acnum > 0)
//DEADCODE RDH 24/03/00 			fightersquads ++;
//DEADCODE RDH 24/03/00 
//DEADCODE RDH 24/03/00 		if (Todays_Packages.taskdata.detached.acnum > 0)
//DEADCODE RDH 24/03/00 			fightersquads ++;
//DEADCODE RDH 24/03/00 	}

//DEADCODE RDH 04/04/00 	int strikeac = Todays_Packages.taskdata.strike.realacnum;
//DEADCODE RDH 04/04/00 	int fighter_pc = fighters;
//DEADCODE RDH 04/04/00 	if ((strikeac == -1) || (fighters == -1))
//DEADCODE RDH 04/04/00 	{
//DEADCODE RDH 04/04/00 		if (fightersquads <= 0)
//DEADCODE RDH 04/04/00 			fightersquads = 1;
//DEADCODE RDH 04/04/00 		if (strikesquads <= 0 )
//DEADCODE RDH 04/04/00 			strikesquads = 1;
//DEADCODE RDH 04/04/00 		strike_pc = strikesquads;
//DEADCODE RDH 04/04/00 		fighter_pc = fightersquads; 
//DEADCODE RDH 04/04/00 	}
//DEADCODE RDH 04/04/00 
		
	int percent =  100* Todays_Packages.taskdata.totalfighter.realacnum
						/(Todays_Packages.taskdata.totalfighter.realacnum+Todays_Packages.taskdata.strike.realacnum);

	s=GETDLGITEM(IDC_PC_FIGHTERS);
	s->SetString(CSprintf("%i",	percent));

//DeadCode JIM 30Oct00 	if (fighters)
//DeadCode JIM 30Oct00 	{
//DeadCode JIM 30Oct00 		s=GETDLGITEM(IDC_PC_ATTACHED);
//DeadCode JIM 30Oct00 		s->SetString(CSprintf("%i",	100 * Todays_Packages.taskdata.attached.realacnum
//DeadCode JIM 30Oct00 					/Todays_Packages.taskdata.totalfighter.realacnum ));
//DeadCode JIM 30Oct00 
//DeadCode JIM 30Oct00 		s=GETDLGITEM(IDC_PC_DETACHED);
//DeadCode JIM 30Oct00 		s->SetString(CSprintf("%i",	100 * Todays_Packages.taskdata.detached.realacnum
//DeadCode JIM 30Oct00 					/Todays_Packages.taskdata.totalfighter.realacnum ));
//DeadCode JIM 30Oct00 
//DeadCode JIM 30Oct00 		s=GETDLGITEM(IDC_PC_RETURNING);
//DeadCode JIM 30Oct00 		s->SetString(CSprintf("%i",	100 * Todays_Packages.taskdata.returned.realacnum
//DeadCode JIM 30Oct00 					/Todays_Packages.taskdata.totalfighter.realacnum ));
//DeadCode JIM 30Oct00 	}else
//DeadCode JIM 30Oct00 	{
//DeadCode JIM 30Oct00 		s=GETDLGITEM(IDC_PC_ATTACHED);
//DeadCode JIM 30Oct00 		s->SetString(RESSTRING(NA));
//DeadCode JIM 30Oct00 
//DeadCode JIM 30Oct00 		s=GETDLGITEM(IDC_PC_DETACHED);
//DeadCode JIM 30Oct00 		s->SetString(RESSTRING(NA));
//DeadCode JIM 30Oct00 
//DeadCode JIM 30Oct00 		s=GETDLGITEM(IDC_PC_RETURNING);
//DeadCode JIM 30Oct00 		s->SetString(RESSTRING(NA));
//DeadCode JIM 30Oct00 
//DeadCode JIM 30Oct00 	}

  	spinbut=GETDLGITEM(IDC_RSPINBUT_BOMBERS);
	spinbut->Clear();

	int maxac =12;
	//..strike.maxac should either be <12 or -1. -1 means that we are counting in squads
	if (Todays_Packages.taskdata.strike.maxac != -1)
		maxac = Todays_Packages.taskdata.strike.maxac;
//DeadCode JIM 16Oct00 	if (maxac>12*3*3*5)
//DeadCode JIM 16Oct00 		maxac=12*3*3*5;
	int index = 0;
	int entry = 0;
	while (AcSpin[entry] <= maxac)
	{
		spinbut->AddString(CSprintf("%i %s", AcSpin[entry], RESSTRING(AIRCRAFT)));
		if  (	(Todays_Packages.taskdata.strike.acnum != -1)
			&&	(Todays_Packages.taskdata.strike.acnum >= AcSpin[entry])
			)
			spinbut->SetIndex(index);
		index++;
		entry++;
	}

	if  (Todays_Packages.taskdata.strike.maxac == -1)
	{
		entry = 0;
		if (Todays_Packages.taskdata.strike.maxsquad>3*3*5)		//JIM 16Oct00
			Todays_Packages.taskdata.strike.maxsquad=3*3*5;
		while (squadinfo[entry].numofsquads <= Todays_Packages.taskdata.strike.maxsquad)
		{
			spinbut->AddString(CSprintf("%i %s", squadinfo[entry].number, LoadResString(squadinfo[entry].name)));
			if  (	(Todays_Packages.taskdata.strike.acnum == -1)
				&&	(Todays_Packages.taskdata.strike.squadnum >= squadinfo[entry].numofsquads)
				)
				spinbut->SetIndex(index);

			entry++;
			index++;
		}
	}
 
  	spinbut=GETDLGITEM(IDC_RSPINBUT_FIGHTERS);
	spinbut->Clear();
	

	 maxac =12;
	if (Todays_Packages.taskdata.attached.maxac != -1)
		maxac = Todays_Packages.taskdata.attached.maxac;


	index = 0;
	entry = 0;
	while (FighterSpin[entry] <= maxac)
	{
		spinbut->AddString(CSprintf("%i %s", FighterSpin[entry], RESSTRING(AIRCRAFT)));
		if  (	(fighters != -1)
			&&	(fighters >= FighterSpin[entry])
			)
		{
			spinbut->SetIndex(index);
			oldindex = index;
		}
		index++;
		entry++;
	}

	if  (Todays_Packages.taskdata.attached.maxac == -1)
	{
		entry = 0;
		while (squadinfo[entry].numofsquads <= Todays_Packages.taskdata.attached.maxsquad)
		{
			spinbut->AddString(CSprintf("%i %s", squadinfo[entry].number, LoadResString(squadinfo[entry].name)));
			if  (	(fighters == -1)
				&&	(fightersquads >= squadinfo[entry].numofsquads)
				)
			{
				spinbut->SetIndex(index);
	 			oldindex = index;
			}

			entry++;
			index++;
		}
	}




	CRCombo* combo;
	combo=GETDLGITEM(IDC_RCOMBOBOMBERTYPE);
	combo->Clear();
	int i = 0;
	while	( i < PackageList::STRIKEOPTIONS)
	{	
		if (Todays_Packages.taskdata.strikeactypes[i] != PackageList::NOTDEFINED)
		{
			if (Todays_Packages.taskdata.strikeactypes[i] == PackageList::MIXED)
				combo->AddString(RESSTRING(MIXED));
			else
				combo->AddString(RESLIST(SPIT_A, Todays_Packages.taskdata.strikeactypes[i]));
		}
		i++;
	};
	combo->SetIndex(0);

 	combo=GETDLGITEM(IDC_RCOMBOFIGHTERTYPE);
	if (fighters)
	{
		combo->Clear();
		int i = 0;
		while	(		( i < PackageList::ESCORTOPTIONS)
				&&	(Todays_Packages.taskdata.escortactypes[i] != PackageList::NOTDEFINED)
			)
		{	
			if (Todays_Packages.taskdata.escortactypes[i] == PackageList::MIXED)
				combo->AddString(RESSTRING(MIXED));
			else
				combo->AddString(RESLIST(SPIT_A, Todays_Packages.taskdata.escortactypes[i]));
			i++;
		};
		combo->SetIndex(0);

	}else
	{
		combo->Clear()->SetList(IDS_NO_AIRCRAFT,1)->
					SetIndex(0);

	}



}