Example #1
0
BOOL CComit_e::OnInitDialog() 
{
	CDialog::OnInitDialog();
	RDialog* parent=(RDialog*)GetParent();
//	parent->SetMaxSize(CRect(0,0,450,380));

	dir_ctrl.AllocateAc();

	CRStatic*   s=GETDLGITEM(IDC_STRIKEINUSE);
	s->SetString(CSprintf("%i",dir_ctrl.TotalStrikeAcInUse));

	s=GETDLGITEM(IDC_FIGHTERSINUSE);
	s->SetString(CSprintf("%i",dir_ctrl.TotalFighterACInUse));

	s=GETDLGITEM(IDC_MISSIONSINUSE);
	s->SetString(CSprintf("%i",dir_ctrl.MissionsAlreadyDefined));

	s=GETDLGITEM(IDC_TARGETSINUSE);
	s->SetString(CSprintf("%i",dir_ctrl.TargetsAlreadyDefined));


	
	CRButton* b = GETDLGITEM(IDC_AUTOGENERATE);
	b->SetPressed(dir_ctrl.autogen);

	b = GETDLGITEM(IDC_AUTODISPLAY);
	b->SetPressed(dir_ctrl.autodisplay);



	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Example #2
0
void CMiscToolbar::OnShowWindow(BOOL bShow, UINT nStatus) 
{
	CRToolBar::OnShowWindow(bShow, nStatus);
//DEADCODE RDH 19/03/99 	if (!RFullPanelDial::incomms)								//rdh 10/1/99
//DEADCODE RDH 19/03/99 	{
//DEADCODE RDH 19/03/99 		CRButton*   b;
//DEADCODE RDH 19/03/99 		b=GETDLGITEM(IDC_REPLAY);
//DEADCODE RDH 19/03/99 		b->ShowWindow(SW_SHOW);
//DEADCODE RDH 19/03/99 		b=GETDLGITEM(IDC_READYROOM);
//DEADCODE RDH 19/03/99 		b->ShowWindow(SW_HIDE);
//DEADCODE RDH 19/03/99 	}else
//DEADCODE RDH 19/03/99 	{
//DEADCODE RDH 19/03/99 		CRButton*   b;
//DEADCODE RDH 19/03/99 		b=GETDLGITEM(IDC_REPLAY);
//DEADCODE RDH 19/03/99 		b->ShowWindow(SW_HIDE);
//DEADCODE RDH 19/03/99 		b=GETDLGITEM(IDC_READYROOM);
//DEADCODE RDH 19/03/99 		b->ShowWindow(SW_SHOW);
//DEADCODE RDH 19/03/99 	}

	CRButton*	but = GETDLGITEM(IDC_REPLAY);
	but->SetPressed(FALSE);		//always lift replay button, might have been pressed
	if (RFullPanelDial::incomms)
	{
		but->SetDisabled(true);
		but->SetHintString(RESSTRING(NOTAVAIL));

	}else
	{
		but->SetDisabled(false);
		but->SetHintString(RESSTRING(REPLAY));

	}

  	but = GETDLGITEM(IDC_READYROOM);
	but->SetPressed(FALSE);		//always lift replay button, might have been pressed
	if (!RFullPanelDial::incomms)
	{
		but->SetDisabled(true);
		but->SetHintString(RESSTRING(NOTAVAIL));

	}else
	{
		but->SetDisabled(false);
		but->SetHintString(RESSTRING(READYROOM));

	}
	but = GETDLGITEM(dialids[DIRECTIVESTOGGLE]);
	but->SetPressed(!MMC.directivespopup);
	
		


}
Example #3
0
void MapFiltersRaids::Refresh()
{
	CRRadio* pradio;

	pradio=GETDLGITEM(IDC_RRADIO_PLOTS);
	pradio->Clear();
	pradio->AddButton(RESSTRING(AUTHENTICPLOTS));
	pradio->AddButton(RESSTRING(ICONSREP));
	pradio->AddButton(RESSTRING(ONEPLOTPERGESCHWADER));
	pradio->AddButton(RESSTRING(ONEPLOTPERGRUPPE));
	pradio->AddButton(RESSTRING(ONEPLOTPERSTAFFEL));
  	pradio->SetCurrentSelection((int)Save_Data.lwplots);


	CRButton* b;



	
	b = GETDLGITEM(IDC_LWARROWS);
	b->SetPressed(Save_Data.mapfilters[FILT_LWARROWS]);
	
	
	
	b = GETDLGITEM(IDC_RAFINTERCEPTS);
	b->SetPressed(Save_Data.mapfilters[FILT_RAFINTERCEPTS]);
	
	b = GETDLGITEM(IDC_RAFPATROLS);
	b->SetPressed(Save_Data.mapfilters[FILT_RAFPATROLS]);
	
	b = GETDLGITEM(IDC_RAFROUTELINES);
	if (		(Save_Data.mapfilters[FILT_RAFINTERCEPTS])
			&&	(Save_Data.mapfilters[FILT_RAFPATROLS])
			&&	(Save_Data.mapfilters[FILT_LWARROWS])
		)
			b->SetPressed(true);
	else
		b->SetPressed(false);
}
Example #4
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);

}
Example #5
0
void MapFiltersTarget::Refresh(bool redrawmap)
{
	CRButton* b;

	b = GETDLGITEM(IDC_RBUTTONFIGHTER);
	b->SetPressed(Save_Data.mapfilters[FILT_AF_FIGHTER]);

	b = GETDLGITEM(IDC_RBUTTONBOMBER);
	b->SetPressed(Save_Data.mapfilters[FILT_AF_BOMBER]);

	b = GETDLGITEM(IDC_RBUTTONCOASTAL);
	b->SetPressed(Save_Data.mapfilters[FILT_AF_COASTAL]);

	b = GETDLGITEM(IDC_AIRFIELDS);
	if		(		(Save_Data.mapfilters[FILT_AF_FIGHTER])
				&&	(Save_Data.mapfilters[FILT_AF_BOMBER])
				&&	(Save_Data.mapfilters[FILT_AF_COASTAL])
			 )
		b->SetPressed(true);
	else
		b->SetPressed(false);

	b = GETDLGITEM(IDC_DOCKS);
	if		(		(Save_Data.mapfilters[FILT_DOCK_NAVAL])
				&&	(Save_Data.mapfilters[FILT_DOCK_CIV])
			 )
		b->SetPressed(true);
	else
		b->SetPressed(false);



	b = GETDLGITEM(IDC_RBUTTON_DOCK_NAVAL);
	b->SetPressed(Save_Data.mapfilters[FILT_DOCK_NAVAL]);

	b = GETDLGITEM(IDC_RBUTTON_DOCK_CIV);
	b->SetPressed(Save_Data.mapfilters[FILT_DOCK_CIV]);


	b = GETDLGITEM(IDC_DEFENCES);
	if		(		(Save_Data.mapfilters[FILT_BALLOONZONES])
				&&	(Save_Data.mapfilters[FILT_FLAKZONES])
			 )
		b->SetPressed(true);
	else
		b->SetPressed(false);

	b = GETDLGITEM(IDC_BALLOONZONES);
	b->SetPressed(Save_Data.mapfilters[FILT_BALLOONZONES]);

	b = GETDLGITEM(IDC_FLAKZONES);
	b->SetPressed(Save_Data.mapfilters[FILT_FLAKZONES]);


	b = GETDLGITEM(IDC_RDF);
	if		(		(Save_Data.mapfilters[FILT_CH])
				&&	(Save_Data.mapfilters[FILT_CHL])
			 )
		b->SetPressed(true);
	else
		b->SetPressed(false);


	b = GETDLGITEM(IDC_CH);
	b->SetPressed(Save_Data.mapfilters[FILT_CH]);


	b = GETDLGITEM(IDC_CHL);
	b->SetPressed(Save_Data.mapfilters[FILT_CHL]);

	b = GETDLGITEM(IDC_CONVOYS);
	b->SetPressed(Save_Data.mapfilters[FILT_CONVOYS]);

	b = GETDLGITEM(IDC_FACTORIES);
	if		(		(Save_Data.mapfilters[FILT_FACTORYFIGHTER])
				&&	(Save_Data.mapfilters[FILT_FACTORYBOMBER])
				&&	(Save_Data.mapfilters[FILT_FACTORYOTHER])
				&&	(Save_Data.mapfilters[FILT_OIL])
				&&	(Save_Data.mapfilters[FILT_POWER])
			 )
		b->SetPressed(true);
	else
		b->SetPressed(false);

	b = GETDLGITEM(IDC_RBUTTON_FACTORYFIGHTER);
	b->SetPressed(Save_Data.mapfilters[FILT_FACTORYFIGHTER]);

	b = GETDLGITEM(IDC_RBUTTON_FACTORYBOMBER);
	b->SetPressed(Save_Data.mapfilters[FILT_FACTORYBOMBER]);


	b = GETDLGITEM(IDC_RBUTTON_FACTORYOTHER);
	b->SetPressed(Save_Data.mapfilters[FILT_FACTORYOTHER]);


	b = GETDLGITEM(IDC_RBUTTON_OIL);
	b->SetPressed(Save_Data.mapfilters[FILT_OIL]);


	b = GETDLGITEM(IDC_RBUTTON_POWER);
	b->SetPressed(Save_Data.mapfilters[FILT_POWER]);

 	b = GETDLGITEM(IDC_NAVPOINTS);
	if		(		(Save_Data.mapfilters[FILT_CITY])
				&&	(Save_Data.mapfilters[FILT_TOWN])
				&&	(Save_Data.mapfilters[FILT_VILLAGES])
				&&	(Save_Data.mapfilters[FILT_LIGHTHOUSES])
//DeadCode RDH 9Sep00 				&&	(Save_Data.mapfilters[FILT_TUNNELS])
			 )
		b->SetPressed(true);
	else
		b->SetPressed(false);


	b = GETDLGITEM(IDC_RBUTTONCITY);
	b->SetPressed(Save_Data.mapfilters[FILT_CITY]);


	b = GETDLGITEM(IDC_RBUTTONTOWN);
	b->SetPressed(Save_Data.mapfilters[FILT_TOWN]);


	b = GETDLGITEM(IDC_RBUTTONVILAGES);
	b->SetPressed(Save_Data.mapfilters[FILT_VILLAGES]);


	b = GETDLGITEM(IDC_RBUTTONLIGHTHOUSES);
	b->SetPressed(Save_Data.mapfilters[FILT_LIGHTHOUSES]);


//DeadCode RDH 2Aug00 	b = GETDLGITEM(IDC_RBUTTONTUNNELS);
//DeadCode RDH 2Aug00 	b->SetPressed(Save_Data.mapfilters[FILT_TUNNELS]);

	b = GETDLGITEM(IDC_OPERATIONALITEMS);
	b->SetPressed(Save_Data.mapfilters[FILT_OPERATIONALITEMS]);

	b = GETDLGITEM(IDC_DAMAGEDITEMS);
	b->SetPressed(Save_Data.mapfilters[FILT_DAMAGEDITEMS]);

	b = GETDLGITEM(IDC_DESTROYEDITEMS);
	b->SetPressed(Save_Data.mapfilters[FILT_DESTROYEDITEMS]);

	if (redrawmap)
			m_pView->m_mapdlg.Invalidate();


}