示例#1
0
void RAFDiary::Refresh()
{
	
	CRCombo* combo;

	combo=GETDLGITEM(IDC_RCOMBOGROUP);
	combo->Clear()->RESCOMBO(10,6)->
					SetIndex(group);

	combo=GETDLGITEM(IDC_RCOMBOSQUAD);
	combo->Clear();
	
	int index = 0;
	for (int i = 0; i < maxsquads; i++)
	{
		combo->AddString(Node_Data.squadron[Squadron[i]].SubName());
		if(sqnum == Node_Data.squadron[Squadron[i]].squadron)
			index = i;

	}

	combo->SetIndex(index);



}
示例#2
0
文件: DAMAGE.CPP 项目: gondur/BOB_Src
void CDamage::OnTextChangedComboElements(LPCTSTR text, short index) 
{
	// TODO: Add your control notification handler code here
  	CRCombo* combo;
	combo=GETDLGITEM(IDC_COMBO_ELEMENTS);
	int comboindex = combo->GetIndex();	
//DEADCODE RDH 16/05/00 	if (comboindex==0)
		groupnum=internalUIDList[comboindex];
//DEADCODE RDH 16/05/00 	else
//DEADCODE RDH 16/05/00 	{
//DEADCODE RDH 16/05/00 		internalUIDList
//DEADCODE RDH 16/05/00 		info_itemS*	p;
//DEADCODE RDH 16/05/00 		UniqueIDBand band;
//DEADCODE RDH 16/05/00 		for (int i=BritAAASiteBAND;i<WorldStuff::PITEMTABLESIZE;i++)
//DEADCODE RDH 16/05/00 			if (	((p=Persons2::ConvertPtrUID(UniqueID(i)))!=NULL)
//DEADCODE RDH 16/05/00 				&&	(p->SGT==wavenum && p->shape.Evaluate()!=EMPTY)
//DEADCODE RDH 16/05/00 				&&	(band=Persons2::getbandfromUID(UniqueID(i)))!=0
//DEADCODE RDH 16/05/00 				&&	band!=LandscapeBAND
//DEADCODE RDH 16/05/00 				)
//DEADCODE RDH 16/05/00 				if (--comboindex==0)
//DEADCODE RDH 16/05/00 					groupnum=i;
//DEADCODE RDH 16/05/00 	}
	m_pView->m_mapdlg.ResetIcon(UniqueID(groupnum));
	FillList();
}
示例#3
0
void CCommsDeathMatchAc::OnTextChangedCurrentac(LPCTSTR text, short Xindex) 
{
#ifndef	BOB_DEMO_VER

  	CRCombo* combo;
	combo=GETDLGITEM(IDC_CURRENTAC);
	int index = combo->GetIndex();	
	if	(_DPlay.GameType == DPlay::DEATHMATCH)
	{
		if (index >= PT_BRIT_NONFLY)
			index +=  (PT_GER_FLYABLE-PT_BRIT_NONFLY);
		DPlay::H2H_Player[_DPlay.mySlot].squadron = index;	
	}else if (_DPlay.Side)
		DPlay::H2H_Player[_DPlay.mySlot].squadron = index;	
	else
		DPlay::H2H_Player[_DPlay.mySlot].squadron = index + PT_GER_FLYABLE;	

// dont need this csquick set up when game is launched

//DeadCode AMM 23Oct00 	CSQuick1::quickdef.UpdateAcType();

//DeadCode JIM 12Jan99 	RFullPanelDial* fullscreen=(RFullPanelDial*)GetParent();
//DEADCODE RDH 25/03/99 	FullPanel()->LaunchDial(new CCurrEmblem,1);
	FullPanel()->PaintShopDesc();

#endif
}
示例#4
0
void CDirects2::OnTextChangedComboStrikeac(LPCTSTR text) 
{
  	CRCombo* combo;
	combo=GETDLGITEM(IDC_COMBO_STRIKEAC);
	CComit_e::This->dir_ctrl.directives[linenum].strikeac = 4 * combo->GetIndex();	

	ResetStrikeAc();
	CComit_e::This->RedrawAll();
	
}
示例#5
0
void CDirects2::OnTextChangedComboFighterac(LPCTSTR text) 
{
	CRCombo* combo;
	combo=GETDLGITEM(IDC_COMBO_FIGHTERAC);
	CComit_e::This->dir_ctrl.directives[linenum].fighterac = 4 * combo->GetIndex();	

	ResetFighterAc();
  	CComit_e::This->RedrawAll();
		
}
示例#6
0
void CSFlight::OnTextChangedCboEnginemanagement(LPCTSTR text, short index) 
{
	OPTIONS
	CRCombo* combo;

	if (index == 0)
	{
		combo=GETDLGITEM(IDC_CBO_PROPPITCH);
		combo->SetEnabled(true);
	}else
	{
		combo=GETDLGITEM(IDC_CBO_PROPPITCH);
		combo->SetEnabled(false);
		Save_Data.flightdifficulty |= FD_PROPPITCH;
	}
}
示例#7
0
void CSFlight::OnTextChangedCboAll(LPCTSTR text, short index) 
{
	// TODO: Add your control notification handler code here
#define	SG2C_CHANGELEVEL   tmp
#include "sg2combo.h"
	OPTIONS

		CRCombo* combo;

	if (GETDLGITEM(IDC_CBO_SPINS)->GetIndex() == 1)
	{
		combo=GETDLGITEM(IDC_CBO_ENGINEMANAGEMENT);
		combo->SetEnabled(true);

		if (GETDLGITEM(IDC_CBO_ENGINEMANAGEMENT)->GetIndex() == 0)
		{
			combo=GETDLGITEM(IDC_CBO_PROPPITCH);
			combo->SetEnabled(true);
		}else
		{
			combo=GETDLGITEM(IDC_CBO_PROPPITCH);
			combo->SetEnabled(false);
			Save_Data.flightdifficulty %= FD_PROPPITCH;
		}
	}else
	{
		combo=GETDLGITEM(IDC_CBO_ENGINEMANAGEMENT);
		combo->SetEnabled(false);
		Save_Data.flightdifficulty %= FD_ENGINEMANAGMENT;

		combo=GETDLGITEM(IDC_CBO_PROPPITCH);
		combo->SetEnabled(false);
		Save_Data.flightdifficulty %= FD_PROPPITCH;
	}
}
示例#8
0
void CSFlight::OnTextChangedCboSpins(LPCTSTR text, short index) 
{
	// TODO: Add your control notification handler code here
	OPTIONS
	CRCombo* combo;

	if (index == 1)
	{
		combo=GETDLGITEM(IDC_CBO_ENGINEMANAGEMENT);
		combo->SetEnabled(true);

		if (GETDLGITEM(IDC_CBO_ENGINEMANAGEMENT)->GetIndex() == 0)
		{
			combo=GETDLGITEM(IDC_CBO_PROPPITCH);
			combo->SetEnabled(true);
		}else
		{
			combo=GETDLGITEM(IDC_CBO_PROPPITCH);
			combo->SetEnabled(false);
			Save_Data.flightdifficulty |= FD_PROPPITCH;
		}
//DEADCODE CSB 13/01/00 		combo=GETDLGITEM(IDC_CBO_PROPPITCH);
//DEADCODE CSB 13/01/00 		combo->SetEnabled(true);
	}else
	{
		combo=GETDLGITEM(IDC_CBO_ENGINEMANAGEMENT);
		combo->SetEnabled(false);
		Save_Data.flightdifficulty |= FD_ENGINEMANAGMENT;

		combo=GETDLGITEM(IDC_CBO_PROPPITCH);
		combo->SetEnabled(false);
		Save_Data.flightdifficulty %= FD_PROPPITCH;
	}
	
}
示例#9
0
void CCommsDeathMatchAc::OnTextChangedCurrentac(LPCTSTR text) 
{
  	CRCombo* combo;
	combo=GETDLGITEM(IDC_CURRENTAC);
	int index = combo->GetIndex();	
	if	(_DPlay.GameType == DEATHMATCH)
	{
		if (index >= SQ_B_NONFLYABLE)
			index +=  (SQ_R_FLYABLE-SQ_B_NONFLYABLE);
		DPlay::H2H_Player[_DPlay.mySlot].squadron = index;	
	}else if (_DPlay.Side)
		DPlay::H2H_Player[_DPlay.mySlot].squadron = index;	
	else
		DPlay::H2H_Player[_DPlay.mySlot].squadron = index + SQ_R_FLYABLE;	

	CSQuick1::quickdef.UpdateAcType();
//DeadCode JIM 12Jan99 	RFullPanelDial* fullscreen=(RFullPanelDial*)GetParent();
//DEADCODE RDH 25/03/99 	FullPanel()->LaunchDial(new CCurrEmblem,1);
	FullPanel()->PaintShopDesc();


}
示例#10
0
文件: SSOUND.CPP 项目: gondur/mig_src
BOOL CSSound::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	if (_DPlay.PlayerCreated)									//AMM 12Jul99
	{															//AMM 12Jul99
		_DPlay.UISendInPrefsMessage();							//AMM 12Jul99
		DPlay::H2H_Player[_DPlay.mySlot].status=CPS_PREFS;		//AMM 12Jul99
	}															//AMM 12Jul99

	OthersPref_Timer=SetTimer(TIMER_PREFSOTHERS,0,NULL);

	CRCombo* combo;
	if	(		(RFullPanelDial::incomms)
			&&	(_DPlay.UIPlayerType==PLAYER_GUEST)
		)
	{
		combo=GETDLGITEM(IDC_CBO_GEFFECTS);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_INJURYEFFECTS);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_WHITEOUTS);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_AUTOVECTORING);
		combo->SetEnabled(false);
	}else
	{
		combo=GETDLGITEM(IDC_CBO_GEFFECTS);
		combo->SetEnabled(true);
		combo=GETDLGITEM(IDC_CBO_INJURYEFFECTS);
		combo->SetEnabled(true);
		combo=GETDLGITEM(IDC_CBO_WHITEOUTS);
		combo->SetEnabled(true);
		combo=GETDLGITEM(IDC_CBO_AUTOVECTORING);
		combo->SetEnabled(true);
	}

	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
示例#11
0
void	QuickParameters::TargNameCombo()
{
	CRCombo* combo;

	combo=GETDLGITEM(IDC_TARGNAME);
	combo->Clear();
	combo->AddString(GetTargName(CSQuick1::quickdef.targets[targtype][0]));
	if (CSQuick1::quickdef.targets[targtype][1])
	combo->AddString(GetTargName(CSQuick1::quickdef.targets[targtype][1]));
	if (CSQuick1::quickdef.targets[targtype][2])
		combo->AddString(GetTargName(CSQuick1::quickdef.targets[targtype][2]));
	if (CSQuick1::quickdef.targets[targtype][3])
		combo->AddString(GetTargName(CSQuick1::quickdef.targets[targtype][3]));
	combo->SetIndex(targentry);
}
示例#12
0
BOOL SelectTarget::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	CRCombo* combo;
	CRButton*	but = GETDLGITEM(IDC_RBUTTONRESET);


	combo=GETDLGITEM(IDC_RCOMBOTARGET);
	if  (	(currtab == -1)
		||	(RFullPanelDial::gameside != RFullPanelDial::SIDE_LW)
		)

	{
		but->ShowWindow(false);
		combo->ShowWindow(false);
		currindex = 0;
	}else
	{

		but->ShowWindow(true);
		combo->ShowWindow(true);
		combo->Clear();
		Profile& pk = Todays_Packages.pack[Todays_Packages.hipack];
		int ti= pk[currsquad].targetindex;
		if (ti<0) ti=0;
		TargetGroup* trg;
		trg = Node_Data[pk.packagetarget[ti].currentid];
 		combo->AddString(GetTargName(trg->uid));

		for (int i=0; i < TargetGroup::MAXSECONDARIES;i++)
		{
			if	(	(trg)	&&	(trg->secondaries[i]))
				combo->AddString(GetTargName(trg->secondaries[i]));
		}
		combo->SetIndex(0);
		currindex = 0;
	}
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
示例#13
0
void CDirects2::Redraw()
{
		char buffer[10];

	CDialog::OnInitDialog();
	CRCombo* combo;
	CREdtBt* b;
	b=GETDLGITEM(IDC_DIRECTIVEBUTTON);
	CRStatic*   s=GETDLGITEM(IDC_RESTING);

	
	int index;
	int string = IDS_L_AIRSUP + CComit_e::This->dir_ctrl.directives[linenum].type;
	if (CComit_e::This->dir_ctrl.directives[linenum].type != SupplyTree::D_RESTING)
	{
		b->ShowWindow(SW_SHOW);
		s->ShowWindow(SW_HIDE);
		b->SetCaption(LoadResString(string));
	}else
	{
		b->ShowWindow(SW_HIDE);
		s->ShowWindow(SW_SHOW);
		s->SetString(LoadResString(string));
	}
	int combosteps;
	combo=GETDLGITEM(IDC_COMBO_STRIKEAC);
	s=GETDLGITEM(IDC_BLANK2);
	if (CComit_e::This->dir_ctrl.directives[linenum].type == SupplyTree::D_AIRSUPERIORITY)
	{
		s->ShowWindow(SW_SHOW);
		combo->ShowWindow(SW_HIDE);
	}else
	{
		combo->ShowWindow(SW_SHOW);
		s->ShowWindow(SW_HIDE);
		combosteps = (CComit_e::This->dir_ctrl.TotalStrikeAc/4)+1;
		if ((combosteps*4-1) < CComit_e::This->dir_ctrl.directives[linenum].strikeac)
			index = combosteps-1;
		else
			index = CComit_e::This->dir_ctrl.directives[linenum].strikeac/4;
		combo->Clear()->MakeNumList(combosteps,0,4)->SetIndex(index);
	}
	combo=GETDLGITEM(IDC_COMBO_FIGHTERAC);
	combosteps = (CComit_e::This->dir_ctrl.TotalFighterAC/4)+1;
	if ((combosteps*4-1) < CComit_e::This->dir_ctrl.directives[linenum].fighterac)
		index = combosteps-1;
	else
		index = CComit_e::This->dir_ctrl.directives[linenum].fighterac/4;
 	combo->Clear()->MakeNumList(combosteps,0,4)->SetIndex(index);


	if (CComit_e::This->dir_ctrl.directives[linenum].type != SupplyTree::D_RESTING)
	{
	 	int x = CComit_e::This->dir_ctrl.directives[linenum].targets;
		_itoa(x,buffer,10);
		CRStatic*   s=GETDLGITEM(IDC_TARGETS);
		s->SetString(buffer);
		x = CComit_e::This->dir_ctrl.directives[linenum].missionsset;
		_itoa(x,buffer,10);
		s=GETDLGITEM(IDC_MISSIONS);
		s->SetString(buffer);
	}else
	{
		CRStatic*   s=GETDLGITEM(IDC_TARGETS);
		s->ShowWindow(SW_HIDE);
		s=GETDLGITEM(IDC_MISSIONS);
		s->ShowWindow(SW_HIDE);

	}

}
示例#14
0
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);

	}



}
示例#15
0
BOOL CSQuick1::OnInitDialog() 
{
	CDialog::OnInitDialog();
	// TODO: Add extra initialization here

	QuickParameters::SetWeather(CSQuick1::quickdef.weather);								//RDH 9Sep00
	QuickParameters::SetTime(CSQuick1::quickdef.time);					//RDH 30Sep00

	CRRadio* pradio;
	CString string;

//	m_IDC_MISSLISTS.SetCircularStyle(TRUE);
//	m_IDC_FLIGHTNUM.SetCircularStyle(TRUE);
//	m_IDC_ELTNUM.SetCircularStyle(TRUE);
//	m_IDC_TARGTYPE.SetCircularStyle(TRUE);
//	m_IDC_TARGNAME.SetCircularStyle(TRUE);

	if (_DPlay.PlayerCreated)
	{
		FullPanel()->ResetQuitOption();
	}

	pradio=GETDLGITEM(IDC_RRADIO);
	string.LoadString(IDS_SCENARIO);
	pradio->AddButton(string);

	string.LoadString(IDS_PARAMETERS);
	pradio->AddButton(string);

	string.LoadString(IDS_UN);
	pradio->AddButton(string);
	string.LoadString(IDS_RED);
	pradio->AddButton(string);

	CRCombo* combo;
	combo=GETDLGITEM(IDC_FAMILYLISTS);
	char i = 0,j=0;
	int	currtitle = quickmissions[0].titlename;
	if (MissionsFound(i, currtitle))
	{
		combo->AddString(LoadResString(quickmissions[0].titlename));
 		missionfamily[j++] = 0;
	}
	while (quickmissions[i].missionname !=NULL)
	{
		if (quickmissions[i].titlename != currtitle)
		{
			currtitle = quickmissions[i].titlename;
 			if (MissionsFound(i, currtitle))
			{
				combo->AddString(LoadResString(quickmissions[i].titlename));
				missionfamily[j++] = i;
			}

		}
		i++;
	}
	missionfamily[j] = 255;
	combo->SetIndex(currquickfamily);


	RefreshMissionCombo();

//DEADCODE RDH 18/01/00 	combo=GETDLGITEM(IDC_ELTNUM);
//DEADCODE RDH 18/01/00 	combo->RESCOMBO(ELTPOS_0,4);
	wassingle=false;
	ReinitCombo();

//	if (RFullPanelDial::incomms)
	if (_DPlay.PlayerCreated)
	{
//DeadCode AMM 16Nov99 		_DPlay.SendInMissionBriefMessage();
//DeadCode AMM 16Nov99 		DPlay::H2H_Player[_DPlay.mySlot].status=CPS_MISSIONBRIEF;
		_DPlay.SendStatusChange(DPlay::CPS_MISSIONBRIEF);
	}

	 missbrief_timer=SetTimer(DPlay::TIMER_MISSIONBRIEF,0,NULL); 

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

}
示例#16
0
void	CSQuick1::RefreshMissionCombo()
{
	CRCombo* combo;
	combo=GETDLGITEM(IDC_MISSLISTS);
	combo->Clear();

//	combo->RESCOMBO(QUICK_1,20)->SetIndex(currquickmiss);
//DeadCode AMM 12May99 	char i = 0;
//DeadCode AMM 12May99 	while (quickmissions[i].missionname !=NULL)
//DeadCode AMM 12May99 	{
//DeadCode AMM 12May99 		combo->AddString(LoadResString(quickmissions[i].missionname));
//DeadCode AMM 12May99 		i++;
//DeadCode AMM 12May99 	}
//DeadCode AMM 12May99 	combo->SetIndex(currquickmiss);

	int i,j=0;
	i = missionfamily[currquickfamily];
	bool		currmissionfound = false;

	while (		(quickmissions[i].missionname !=NULL)
		&&	(i < missionfamily[currquickfamily+1])
	   )
	{
		if 	(currquickmiss == i)
			currmissionfound = true;
		i++;

	}
	if (!currmissionfound)
	 	currquickmiss = missionfamily[currquickfamily];


	i = missionfamily[currquickfamily];
	j=0;
	while (		(quickmissions[i].missionname !=NULL)
			&&	(i < missionfamily[currquickfamily+1])
		   )
	{
		if (MissionAllowed(i))
		{
			misslistbackindex[i]=j;
			misslistindex[j]=i;
			j++;
			combo->AddString(LoadResString(quickmissions[i].missionname));
		}
		else
			misslistbackindex[i]=255;
		i++;
	}
	if (misslistbackindex[currquickmiss]!=255)
	{
//DeadCode JIM 20Oct00  		for (int t=0; t<20;t++)
//DeadCode JIM 20Oct00 		{
//DeadCode JIM 20Oct00 			int r = misslistbackindex[t];
//DeadCode JIM 20Oct00 		}
		combo->SetIndex(misslistbackindex[currquickmiss]);
	}
	else
	{
		currquickmiss=misslistindex[0];
		quickdef=quickmissions[currquickmiss];
		combo->SetIndex(0);
	}
}
示例#17
0
BOOL CSFlight::OnInitDialog() 
{
	CDialog::OnInitDialog();

	if (_DPlay.PlayerCreated)
	{
//DeadCode AMM 16Nov99 		_DPlay.UISendInPrefsMessage();
//DeadCode AMM 16Nov99 		DPlay::H2H_Player[_DPlay.mySlot].status=CPS_PREFS;
		_DPlay.SendStatusChange(DPlay::CPS_PREFS);
	}

	FlightPref_Timer=SetTimer(DPlay::TIMER_PREFSFLIGHT,0,NULL);

#define	SG2C_DISPLAY setlevel
#include "sg2combo.h"
	OPTIONS	
//DEADCODE RDH 24/11/99 	m_IDC_CBO_ALL.SetCircularStyle(TRUE);
//DEADCODE RDH 24/11/99 	m_IDC_CBO_POWERBOOST.SetCircularStyle(TRUE);
//DEADCODE RDH 24/11/99 	m_IDC_CBO_WINDGUSTS.SetCircularStyle(TRUE);
//DEADCODE RDH 24/11/99 	m_IDC_CBO_SPINS.SetCircularStyle(TRUE);
//DEADCODE RDH 24/11/99 	m_IDC_CBO_AIRFRAME.SetCircularStyle(TRUE);
//DEADCODE RDH 24/11/99 	m_IDC_CBO_TORQUE.SetCircularStyle(TRUE);
//DEADCODE RDH 24/11/99 	m_IDC_CBO_109FUEL.SetCircularStyle(TRUE);
//DEADCODE RDH 24/11/99 	m_IDC_CBO_WIND0.SetCircularStyle(TRUE);
//DEADCODE RDH 24/11/99 

	CRCombo* combo;
 	if(Save_Data.flightdifficulty[FD_SPINS] && !_DPlay.PlayerCreated)
	{
		combo=GETDLGITEM(IDC_CBO_ENGINEMANAGEMENT);
		combo->SetEnabled(true);

		if(Save_Data.flightdifficulty[FD_ENGINEMANAGMENT])
		{
			combo=GETDLGITEM(IDC_CBO_PROPPITCH);
			combo->SetEnabled(false);
		}
	}
	else
	{
		combo=GETDLGITEM(IDC_CBO_ENGINEMANAGEMENT);
		combo->SetEnabled(false);

		combo=GETDLGITEM(IDC_CBO_PROPPITCH);
		combo->SetEnabled(false);
	}






	if	(		(RFullPanelDial::incomms)
			&&	(_DPlay.UIPlayerType==DPlay::PLAYER_GUEST)
		)
	{
		combo=GETDLGITEM(IDC_CBO_ALL);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_POWERBOOST);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_WINDGUSTS);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_SPINS);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_AIRFRAME);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_TORQUE);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_109FUEL);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_WIND0);
		combo->SetEnabled(false);
	}else
	{
		combo=GETDLGITEM(IDC_CBO_ALL);
		combo->SetEnabled(true);
		combo=GETDLGITEM(IDC_CBO_POWERBOOST);
		combo->SetEnabled(true);
		combo=GETDLGITEM(IDC_CBO_WINDGUSTS);
		combo->SetEnabled(true);
		combo=GETDLGITEM(IDC_CBO_SPINS);
		combo->SetEnabled(true);
		combo=GETDLGITEM(IDC_CBO_AIRFRAME);
		combo->SetEnabled(true);
		combo=GETDLGITEM(IDC_CBO_TORQUE);
		combo->SetEnabled(true);
		combo=GETDLGITEM(IDC_CBO_109FUEL);
		combo->SetEnabled(true);
		combo=GETDLGITEM(IDC_CBO_WIND0);
		combo->SetEnabled(true);
	}

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
示例#18
0
BOOL CSFlight::OnInitDialog() 
{
	CDialog::OnInitDialog();

	if (_DPlay.PlayerCreated)
	{
		_DPlay.UISendInPrefsMessage();
		DPlay::H2H_Player[_DPlay.mySlot].status=CPS_PREFS;
	}

	FlightPref_Timer=SetTimer(TIMER_PREFSFLIGHT,0,NULL);

#define	SG2C_DISPLAY setlevel
#include "sg2combo.h"
	OPTIONS	
	m_IDC_CBO_ALL.SetCircularStyle(TRUE);
	m_IDC_CBO_FLAMEOUTS.SetCircularStyle(TRUE);
	m_IDC_CBO_POWERBOOST.SetCircularStyle(TRUE);
	m_IDC_CBO_AUTOTHROTTLE.SetCircularStyle(TRUE);
	m_IDC_CBO_WINDGUSTS.SetCircularStyle(TRUE);
	m_IDC_CBO_SPINS.SetCircularStyle(TRUE);
	m_IDC_CBO_AIRFRAME.SetCircularStyle(TRUE);
	m_IDC_CBO_STORES.SetCircularStyle(TRUE);
	m_IDC_CBO_TORQUE.SetCircularStyle(TRUE);
	m_IDC_CBO_ENGINE.SetCircularStyle(TRUE);
	m_IDC_CBO_WIND0.SetCircularStyle(TRUE);


	CRCombo* combo;
	if	(		(RFullPanelDial::incomms)
			&&	(_DPlay.UIPlayerType==PLAYER_GUEST)
		)
	{
		combo=GETDLGITEM(IDC_CBO_ALL);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_FLAMEOUTS);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_POWERBOOST);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_AUTOTHROTTLE);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_WINDGUSTS);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_SPINS);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_AIRFRAME);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_STORES);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_TORQUE);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_ENGINE);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_WIND0);
		combo->SetEnabled(false);
	}else
	{
		combo=GETDLGITEM(IDC_CBO_ALL);
		combo->SetEnabled(true);
		combo=GETDLGITEM(IDC_CBO_FLAMEOUTS);
		combo->SetEnabled(true);
		combo=GETDLGITEM(IDC_CBO_POWERBOOST);
		combo->SetEnabled(true);
		combo=GETDLGITEM(IDC_CBO_AUTOTHROTTLE);
		if (RFullPanelDial::incomms)
			combo->SetEnabled(false);
		else
			combo->SetEnabled(true);
		combo=GETDLGITEM(IDC_CBO_WINDGUSTS);
		combo->SetEnabled(true);
		combo=GETDLGITEM(IDC_CBO_SPINS);
		combo->SetEnabled(true);
		combo=GETDLGITEM(IDC_CBO_AIRFRAME);
		combo->SetEnabled(true);
		combo=GETDLGITEM(IDC_CBO_STORES);
		combo->SetEnabled(true);
		combo=GETDLGITEM(IDC_CBO_TORQUE);
		combo->SetEnabled(true);
		combo=GETDLGITEM(IDC_CBO_ENGINE);
		combo->SetEnabled(true);
		combo=GETDLGITEM(IDC_CBO_WIND0);
		combo->SetEnabled(true);
	}

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
示例#19
0
void	QuickParameters::ReinitCombo()
{
	CRCombo* combo;
	targtype=0,targentry=0;
	for (int t=0;t<4;t++)
		for (int e=0;e<4;e++)
			if(CSQuick1::quickdef.targets[t][e]==CSQuick1::quickdef.target)
				targtype=t,targentry=e;

	combo=GETDLGITEM(IDC_TARGTYPE);
	combo->Clear();
	combo->AddString(LoadResString(CSQuick1::quickdef.targtypeIDs[0]));
	if (CSQuick1::quickdef.targtypeIDs[1])
		combo->AddString(LoadResString(CSQuick1::quickdef.targtypeIDs[1]));
	if (CSQuick1::quickdef.targtypeIDs[2])
		combo->AddString(LoadResString(CSQuick1::quickdef.targtypeIDs[2]));
	if (CSQuick1::quickdef.targtypeIDs[3])
		combo->AddString(LoadResString(CSQuick1::quickdef.targtypeIDs[3]));
	if (CSQuick1::quickdef.targtypeIDs[0])
		combo->SetIndex(targtype);

	TargNameCombo();


	SWord Latitude = 51;												//RDH 25/02/00
	MMC.Sky.SetMissionDawnDusk(Latitude, MMC.currdate, MMC.dawntime, MMC.dusktime);

	int timeindex = CSQuick1::quickdef.time;
	SetTime(timeindex);
	

	combo=GETDLGITEM(IDC_TIME);
	combo->Clear();
	combo->RESCOMBO(DAWN,4)->SetIndex(timeindex);

	int weatherindex = CSQuick1::quickdef.weather;
	SetWeather(weatherindex);


	combo=GETDLGITEM(IDC_CLOUD);
	combo->Clear();
	combo->RESCOMBO(CLEARSKY,4)->SetIndex(weatherindex);

}
示例#20
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);

}
示例#21
0
文件: SGAME.CPP 项目: gondur/BOB_Src
BOOL CSGame::OnInitDialog() 
{
	CDialog::OnInitDialog();

	if (_DPlay.PlayerCreated)									//AMM 12Jul99
	{															//AMM 12Jul99
//DeadCode AMM 16Nov99 		_DPlay.UISendInPrefsMessage();							//AMM 12Jul99
//DeadCode AMM 16Nov99 		DPlay::H2H_Player[_DPlay.mySlot].status=CPS_PREFS;		//AMM 12Jul99
	_DPlay.SendStatusChange(DPlay::CPS_PREFS);
	}															//AMM 12Jul99

	GamePref_Timer=SetTimer(DPlay::TIMER_PREFSGAME,0,NULL);


	CRCombo* combo;
	if	(		(RFullPanelDial::incomms)
			&&	(_DPlay.UIPlayerType==DPlay::PLAYER_GUEST)
		)
	{
		combo=GETDLGITEM(IDC_CBO_WEAPONS);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_VULNERABLETOFIRE);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_GROUNDCOLLISIONS);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_MIDAIRCOLLISIONS);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_AIPILOTALLTIME);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_ACCELOFF);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_TARGETSIZE);
		combo->SetEnabled(false);
		combo=GETDLGITEM(IDC_CBO_TEXTINFO);
		combo->SetEnabled(false);
	}else
	{
		combo=GETDLGITEM(IDC_CBO_WEAPONS);
		combo->SetEnabled(true);
		if (RFullPanelDial::incomms && _DPlay.GameType<DPlay::COMMSQUICKMISSION)
		{
			combo=GETDLGITEM(IDC_CBO_VULNERABLETOFIRE);
			combo->SetEnabled(false);
			combo=GETDLGITEM(IDC_CBO_GROUNDCOLLISIONS);
			combo->SetEnabled(false);
			combo=GETDLGITEM(IDC_CBO_MIDAIRCOLLISIONS);
			combo->SetEnabled(false);
		}
		else
		{
			combo=GETDLGITEM(IDC_CBO_VULNERABLETOFIRE);
			combo->SetEnabled(true);
			combo=GETDLGITEM(IDC_CBO_GROUNDCOLLISIONS);
			combo->SetEnabled(true);
			combo=GETDLGITEM(IDC_CBO_MIDAIRCOLLISIONS);
			combo->SetEnabled(true);
		}
		combo=GETDLGITEM(IDC_CBO_AIPILOTALLTIME);
		combo->SetEnabled(true);
		combo=GETDLGITEM(IDC_CBO_ACCELOFF);
		combo->SetEnabled(true);
		combo=GETDLGITEM(IDC_CBO_TARGETSIZE);
		combo->SetEnabled(true);
		combo=GETDLGITEM(IDC_CBO_TEXTINFO);
		combo->SetEnabled(true);

	}

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
示例#22
0
文件: SSOUND.CPP 项目: gondur/BOB_Src
BOOL CSSound::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	if (_DPlay.PlayerCreated)									//AMM 12Jul99
	{															//AMM 12Jul99
		_DPlay.SendStatusChange(DPlay::CPS_PREFS);
	}															//AMM 12Jul99

	OthersPref_Timer=SetTimer(DPlay::TIMER_PREFSOTHERS,0,NULL);

//DEADCODE RDH 25/11/99 	CRCombo* combo;
//DEADCODE RDH 25/11/99 	if	(		(RFullPanelDial::incomms)
//DEADCODE RDH 25/11/99 			&&	(_DPlay.UIPlayerType==PLAYER_GUEST)
//DEADCODE RDH 25/11/99 		)
//DEADCODE RDH 25/11/99 	{
//DEADCODE RDH 25/11/99 		combo=GETDLGITEM(IDC_CBO_GEFFECTS);
//DEADCODE RDH 25/11/99 		combo->SetEnabled(false);
//DEADCODE RDH 25/11/99 		combo=GETDLGITEM(IDC_CBO_INJURYEFFECTS);
//DEADCODE RDH 25/11/99 		combo->SetEnabled(false);
//DEADCODE RDH 25/11/99 		combo=GETDLGITEM(IDC_CBO_WHITEOUTS);
//DEADCODE RDH 25/11/99 		combo->SetEnabled(false);
//DEADCODE RDH 25/11/99 		combo=GETDLGITEM(IDC_CBO_AUTOVECTORING);
//DEADCODE RDH 25/11/99 		combo->SetEnabled(false);
//DEADCODE RDH 25/11/99 	}else
//DEADCODE RDH 25/11/99 	{
//DEADCODE RDH 25/11/99 		combo=GETDLGITEM(IDC_CBO_GEFFECTS);
//DEADCODE RDH 25/11/99 		combo->SetEnabled(true);
//DEADCODE RDH 25/11/99 		combo=GETDLGITEM(IDC_CBO_INJURYEFFECTS);
//DEADCODE RDH 25/11/99 		combo->SetEnabled(true);
//DEADCODE RDH 25/11/99 		combo=GETDLGITEM(IDC_CBO_WHITEOUTS);
//DEADCODE RDH 25/11/99 		combo->SetEnabled(true);
//DEADCODE RDH 25/11/99 		combo=GETDLGITEM(IDC_CBO_AUTOVECTORING);
//DEADCODE RDH 25/11/99 		combo->SetEnabled(true);
//DEADCODE RDH 25/11/99 	}
//DEADCODE RDH 25/11/99 


	CRCombo* combo;
	combo=GETDLGITEM(IDC_CBO_SOUNDDRIVER);
	combo->Clear();

	LPDSPORTINFO dstemp=NULL;
	ULong index=0;

	if (_Miles.dig && _Miles.dig->DIG_valid())
	{
		dstemp=_Miles.dig->PortInfo;
	}

	if (!dstemp)
	{
		combo->AddString(RESSTRING(NOTAVAILABLE));
	}
	else
	{
		ULong n=0;

		while (dstemp)
		{
			combo->AddString(dstemp->device);
			if (dstemp->port==Save_Data.SFXDevice)
				index=n;

			n++;
			dstemp=dstemp->next;
		}
	}

	combo->SetIndex(index);

//DEADCODE RDH 07/03/00 	combo=GETDLGITEM(IDC_CBO_MUSICDRIVER);
//DEADCODE RDH 07/03/00 	combo->Clear();
//DEADCODE RDH 07/03/00 
//DEADCODE RDH 07/03/00 	LPDMPORTINFO temp=NULL;
//DEADCODE RDH 07/03/00 
//DEADCODE RDH 07/03/00 	index=0;
//DEADCODE RDH 07/03/00 	
//DEADCODE RDH 07/03/00 	if (_Miles.mdi && _Miles.mdi->MDI_valid())
//DEADCODE RDH 07/03/00 	{
//DEADCODE RDH 07/03/00 		temp=_Miles.mdi->PortInfo;
//DEADCODE RDH 07/03/00 	}
//DEADCODE RDH 07/03/00 
//DEADCODE RDH 07/03/00 	if (!temp)
//DEADCODE RDH 07/03/00 	{
//DEADCODE RDH 07/03/00 		combo->AddString(RESSTRING(NOTAVAILABLE));
//DEADCODE RDH 07/03/00 	}
//DEADCODE RDH 07/03/00 	else
//DEADCODE RDH 07/03/00 	{
//DEADCODE RDH 07/03/00 		ULong n=0;
//DEADCODE RDH 07/03/00 
//DEADCODE RDH 07/03/00 		while (temp)
//DEADCODE RDH 07/03/00 		{
//DEADCODE RDH 07/03/00 			combo->AddString(temp->device);
//DEADCODE RDH 07/03/00 			if (temp->port==Save_Data.MusicDevice)
//DEADCODE RDH 07/03/00 				index=n;
//DEADCODE RDH 07/03/00 
//DEADCODE RDH 07/03/00 			n++;
//DEADCODE RDH 07/03/00 			temp=temp->next;
//DEADCODE RDH 07/03/00 		}
//DEADCODE RDH 07/03/00 	}
//DEADCODE RDH 07/03/00 
//DEADCODE RDH 07/03/00 	combo->SetIndex(index);

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