Beispiel #1
0
BOOL CSQuick2::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	if (_DPlay.PlayerCreated)
	{
//DeadCode AMM 16Nov99 		_DPlay.SendInDebriefMessage();
//DeadCode AMM 16Nov99 		DPlay::H2H_Player[_DPlay.mySlot].status=CPS_DEBRIEF;
		_DPlay.SendStatusChange(DPlay::CPS_DEBRIEF);
	}
	Debrief_Timer=SetTimer(DPlay::TIMER_DEBRIEF,0,NULL);

	
	CRStatic*   s=GETDLGITEM(IDC_SMISSIONTITLE);
	if (CSQuick1::currquickmiss==-1)
//DEADCODE RDH 08/05/00 		s->SetString(RESSTRING(SINGLEPLAYER1));
		s->SetString(RESSTRING(RODS_STRINGS));
	else
		s->SetString(LoadResString(CSQuick1::quickmissions[CSQuick1::currquickmiss].missionname));
	s=GETDLGITEM(IDC_SOBJECTIVETITLE);
	s->SetString(GetTargName(CSQuick1::quickdef.target));

	//clear them out, not used										  //RDH 15/06/99
 	s=GETDLGITEM(IDC_SMISSIONRATING);
	s->SetString("");
	s=GETDLGITEM(IDC_RSTATICCTRL4);
	s->SetString("");
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Beispiel #2
0
BOOL CQuickView::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	CRStatic*   s=GETDLGITEM(IDC_CURRMISS);
	s->SetString(RESLIST(QUICK_1, CSQuick1::currquickmiss));


		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;
	s=GETDLGITEM(IDC_TARGTYPE);
	s->SetString(LoadResString(CSQuick1::quickdef.targtypeIDs[targtype]));

	s=GETDLGITEM(IDC_TARGNAME);
	s->SetString(GetTargName(CSQuick1::quickdef.targets[targtype][targentry]));

	s=GETDLGITEM(IDC_WEATHER);
	s->SetString(RESLIST(WEATHER_CLEAR, CSQuick1::quickdef.weather));
	s=GETDLGITEM(IDC_CLOUD);
	s->SetString(CSprintf("%i", 5000 + 1000 * CSQuick1::quickdef.cloudbaseK));
	

	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Beispiel #3
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);



}
Beispiel #4
0
void CommsChat::OnReturnPressedPlayerchat(LPCTSTR text) 
{
	if (text[0])
	{
		CRListBox* rlistbox;
		CREdit* poo;

		rlistbox=GETDLGITEM(IDC_RLIST_INCOMING_CHAT);
//DeadCode RDH 14Dec99 		if (!strcmp(text,"megashootcheaton"))
//DeadCode RDH 14Dec99 		{
//DeadCode RDH 14Dec99 			_DPlay.megashootcheat=true;
//DeadCode RDH 14Dec99 		}
//DeadCode RDH 14Dec99 		else if (!strcmp(text,"megashootcheatoff"))
//DeadCode RDH 14Dec99 		{
//DeadCode RDH 14Dec99 			_DPlay.megashootcheat=false;
//DeadCode RDH 14Dec99 		}
//DeadCode RDH 14Dec99 		else if (!strcmp(text,"invulnerablecheaton"))
//DeadCode RDH 14Dec99 		{
//DeadCode RDH 14Dec99 			_DPlay.megashootcheat=false;
//DeadCode RDH 14Dec99 		}
//DeadCode RDH 14Dec99 		else if (!strcmp(text,"invulnerablecheatoff"))
//DeadCode RDH 14Dec99 		{
//DeadCode RDH 14Dec99 			_DPlay.megashootcheat=false;
//DeadCode RDH 14Dec99 		}
//DeadCode RDH 14Dec99 		else if (!strcmp(text,"liftcheaton"))
//DeadCode RDH 14Dec99 		{
//DeadCode RDH 14Dec99 			_DPlay.liftcheat=true;
//DeadCode RDH 14Dec99 		}
//DeadCode RDH 14Dec99 		else if (!strcmp(text,"liftcheatoff"))
//DeadCode RDH 14Dec99 		{
//DeadCode RDH 14Dec99 			_DPlay.liftcheat=false;
//DeadCode RDH 14Dec99 		}
//DeadCode RDH 14Dec99 		else
		{
//DeadCode AMM 16Nov99 			rlistbox=GETDLGITEM(IDC_RLIST_INCOMING_CHAT);

	//DeadCode AMM 05Aug98 	rlistbox->AddString(&_DPlay.PlayerName[0],0);
			rlistbox->AddString((DPlay::H2H_Player+_DPlay.mySlot)->name,0);
			rlistbox->AddString(text,1);
	//	_DPlay.UISendDialogue((DPlay::H2H_Player+_DPlay.mySlot),(char*)text);
			_DPlay.UISendDialogue((char*)text);
			_DPlay.AddChatMessageToBuffer((DPlay::H2H_Player+_DPlay.mySlot)->name,(char*)text);

//DeadCode AMM 12Oct00 			if (!strcmp(text,"whateveron"))
//DeadCode AMM 12Oct00 				_DPlay.whatever=true;
//DeadCode AMM 12Oct00 			else if (!strcmp(text,"whateveroff"))
//DeadCode AMM 12Oct00 				_DPlay.whatever=false;
		}
		rlistbox->SetHilightRow(-1) ;							//AMM 10Jul99
		poo=GETDLGITEM(IDC_PLAYERCHAT);
		poo->SetCaption("");										  //AMM 06/07/99

//DeadCode AMM 07Jul99 		poo->SetWindowText("");
	}
	
}
Beispiel #5
0
void	CSQuick1::ReinitCombo()
{
	quickdef.parent=this;
//DEADCODE RDH 18/01/00 	MakeFlightCombo();
 	CRRadio*	pradio=GETDLGITEM(IDC_RRADIO);
 	pradio->SetCurrentSelection(0);

	if (quickdef.currmissnum == FIL_NULL)
	{
		pradio->ShowWindow(SW_HIDE);

		GETDLGITEM(IDC_DISABLEDEMO)->ShowWindow(SW_SHOW);
	}
	else
	{
		pradio->ShowWindow(SW_SHOW);

		GETDLGITEM(IDC_DISABLEDEMO)->ShowWindow(SW_HIDE);
	}

//DEADCODE RDH 18/01/00 	CRCombo* combo;
//DEADCODE RDH 18/01/00 	targtype=0,targentry=0;
//DEADCODE RDH 18/01/00 	for (int t=0;t<4;t++)
//DEADCODE RDH 18/01/00 		for (int e=0;e<4;e++)
//DEADCODE RDH 18/01/00 			if(quickdef.targets[t][e]==quickdef.target)
//DEADCODE RDH 18/01/00 				targtype=t,targentry=e;
//DEADCODE RDH 18/01/00 	combo=GETDLGITEM(IDC_TARGTYPE);
//DEADCODE RDH 18/01/00 	combo->Clear();
//DEADCODE RDH 18/01/00 	combo->AddString(LoadResString(quickdef.targtypeIDs[0]));
//DEADCODE RDH 18/01/00 	if (quickdef.targtypeIDs[1])
//DEADCODE RDH 18/01/00 		combo->AddString(LoadResString(quickdef.targtypeIDs[1]));
//DEADCODE RDH 18/01/00 	if (quickdef.targtypeIDs[2])
//DEADCODE RDH 18/01/00 		combo->AddString(LoadResString(quickdef.targtypeIDs[2]));
//DEADCODE RDH 18/01/00 	if (quickdef.targtypeIDs[3])
//DEADCODE RDH 18/01/00 		combo->AddString(LoadResString(quickdef.targtypeIDs[3]));
//DEADCODE RDH 18/01/00 	if (quickdef.targtypeIDs[0])
//DEADCODE RDH 18/01/00 		combo->SetIndex(targtype);
//DEADCODE RDH 18/01/00 	combo=GETDLGITEM(IDC_TARGNAME);
//DEADCODE RDH 18/01/00 
//DEADCODE RDH 18/01/00 	//may pull this off as subroutine:
//DEADCODE RDH 18/01/00 	combo->Clear();
//DEADCODE RDH 18/01/00 	combo->AddString(GetTargName(quickdef.targets[targtype][0]));
//DEADCODE RDH 18/01/00 	if (quickdef.targets[targtype][1])
//DEADCODE RDH 18/01/00 	combo->AddString(GetTargName(quickdef.targets[targtype][1]));
//DEADCODE RDH 18/01/00 	if (quickdef.targets[targtype][2])
//DEADCODE RDH 18/01/00 		combo->AddString(GetTargName(quickdef.targets[targtype][2]));
//DEADCODE RDH 18/01/00 	if (quickdef.targets[targtype][3])
//DEADCODE RDH 18/01/00 		combo->AddString(GetTargName(quickdef.targets[targtype][3]));
//DEADCODE RDH 18/01/00 	combo->SetIndex(targentry);
//DEADCODE RDH 18/01/00 
//	combo=GETDLGITEM(IDC_WEATHER);
//	combo->Clear()->RESCOMBO(WEATHER_CLEAR,3)->SetIndex(quickdef.weather);
//	combo=GetDlgItem(IDC_CLOUD);
//	combo->Clear()->MakeNumList(35,5000,1000)->SetIndex(quickdef.cloudbaseK);
	
}
Beispiel #6
0
void CBattleDetail::FillBtmBox()
{
		CRListBox* rlistbox;
	rlistbox=GETDLGITEM(IDC_RLISTBOXBTM);
	rlistbox->Clear();
	rlistbox->AddColumn(120);
	rlistbox->AddColumn(40);
	rlistbox->AddColumn(64);
	rlistbox->AddColumn(100);

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

	TeamDef* topteam = &node->supplyline->groundbattle.teamlist[teams[currrow]];
	if (teams[currrow] != -1)
	{
//DeadCode RDH 14Jun99 		CRListBox* rlistbox;
//DeadCode RDH 14Jun99 		rlistbox=GETDLGITEM(IDC_RLISTBOXBTM);
		for (int i=0;i<node->supplyline->groundbattle.usedteams;i++)
		{
			if (node->supplyline->groundbattle.teamlist[i].team!=blueforce)
			{
				TeamDef* btmteam = &node->supplyline->groundbattle.teamlist[i];
				 
				if	(		(btmteam->nextnode == topteam->node)
						||	(btmteam->node == topteam->nextnode)
						||	(btmteam->node == topteam->node)
						||	(btmteam->nextnode == topteam->nextnode)
					)
					
				{
					rlistbox->AddString(LoadResString(node->supplyline->groundbattle.teamlist[i].forcename),0);
					rlistbox->AddString(CSprintf(" %i",node->supplyline->groundbattle.teamlist[i].strength/100),1);
					rlistbox->AddString(LoadResString(IDS_L_INACTIVE + node->supplyline->groundbattle.teamlist[i].action),2);
					CString string, string2;
					string.LoadString(node->supplyline->groundbattle.teamlist[i].node->mainids);
					if (string.GetLength() > 0)
					{
						string.TrimLeft();
						string2 = string;
						string2.MakeUpper();
						string.SetAt(0, string2.GetAt(0));
	//DEADCODE RDH 03/04/99 					rlistbox->AddString(LoadResString(node->supplyline->groundbattle.teamlist[i].node->mainids),3);
						rlistbox->AddString(string,3);
					}				
				}
			}
		}
		rlistbox=GETDLGITEM(IDC_RLISTBOXTOP);
		rlistbox->SetHilightRow(currrow+1);
	}
}
Beispiel #7
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);
	
		


}
Beispiel #8
0
void HostilesList::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(HostilesList)
	DDX_Control(pDX, IDC_RLISTBOXCTRL1, m_IDC_RLISTBOXCTRL1);
	DDX_Control(pDX, IDC_RBUTTONAUTHORISE, m_IDC_RBUTTONAUTHORISE);
	DDX_Control(pDX, IDC_RBUTTONASSIGNPATROL, m_IDC_RBUTTONASSIGNPATROL);
	DDX_Control(pDX, IDC_RBUTTONINTELL, m_IDC_RBUTTONINTELL);
	DDX_Control(pDX, IDC_RBUTTONMISSIONFOLDER, m_IDC_RBUTTONMISSIONFOLDER);
	DDX_Control(pDX, IDC_ATTARGET, m_IDC_ATTARGET);
	DDX_Control(pDX, IDC_FORMING, m_IDC_FORMING);
	DDX_Control(pDX, IDC_INCOMING, m_IDC_INCOMING);
	DDX_Control(pDX, IDC_RAID_ENGAGED, m_IDC_RAID_ENGAGED);
	DDX_Control(pDX, IDC_ENGAGED, m_IDC_ENGAGED);
	DDX_Control(pDX, IDC_NORESPONSE, m_IDC_NORESPONSE);
	DDX_Control(pDX, IDC_OUTGOING, m_IDC_OUTGOING);
	DDX_Control(pDX, IDC_RESPONSES, m_IDC_RESPONSES);
	//}}AFX_DATA_MAP
	CRListBox* rlistbox;
	rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL1);
	rlistbox->AddString("",0);
	rlistbox->AddColumn(32);										  //RDH 02/06/99
	rlistbox->AddColumn(20);										  //RDH 02/06/99
	rlistbox->AddColumn(2);
}
Beispiel #9
0
void CThumbnail::OnPaint() 
{
	PAINTSTRUCT paintstruct;
	CDC* pDC;
	pDC=BeginPaint(&paintstruct);
	paintstruct.fErase=TRUE;
	CRect rect;
	GetClientRect(rect);
	// first draw scaled version of thumbnail underneath title bar
	CRButton* button;
	button=GETDLGITEM(IDJ_TITLE);
	CRect buttonrect;
	button->GetClientRect(buttonrect);
	rect.top+=buttonrect.bottom;
	// +1 prevents gaps
	int halfheight=rect.Height()/2+1;
	int offset=rect.Height()/8+1;
	int offset2=rect.Height()/16+1;
	DrawScaledBitmap(pDC,FIL_THUMBTOP,rect.left,rect.top-offset,rect.Width(),halfheight+offset2);
	DrawScaledBitmap(pDC,FIL_THUMBBOT,rect.left,rect.top+halfheight-offset2,rect.Width(),halfheight+offset2);
	// now draw the box in the appropriate position
	CRect rect2;
	m_pView->GetClientRect(rect2);
	m_boxSize=CSize((rect.right*rect2.right)/m_pView->m_size.cx,
					(rect.Height()*rect2.bottom)/m_pView->m_size.cy);
	if(m_LButtonDown==FALSE)
	{
		m_point=CPoint(((m_pView->m_scrollpoint.x*rect.right)/m_pView->m_size.cx)+(m_boxSize.cx/2),
					   ((m_pView->m_scrollpoint.y*rect.Height())/m_pView->m_size.cy)+(m_boxSize.cy/2)+rect.top);
		m_point=m_point+offsetfix;			//quick thumbnail fix
	}
	m_point.x=max(m_boxSize.cx/2,m_point.x);
	m_point.y=max((m_boxSize.cy/2)+rect.top,m_point.y);
	m_point.x=min(rect.right-(m_boxSize.cx/2),m_point.x);
	m_point.y=min(rect.bottom-(m_boxSize.cy/2),m_point.y);
	CPen pen;
	pen.CreatePen(PS_SOLID,2,RGB(255,0,0)); // red pen
	pDC->SelectObject(&pen);

	if (m_boxSize.cx<20) 
	{
		pDC->MoveTo(m_point.x-10,m_point.y);
		pDC->LineTo(m_point.x-m_boxSize.cx/2,m_point.y);
		pDC->MoveTo(m_point.x+10,m_point.y);
		pDC->LineTo(m_point.x+m_boxSize.cx/2,m_point.y);
	}
	if (m_boxSize.cy<20)
	{
		pDC->MoveTo(m_point.x,m_point.y-10);
		pDC->LineTo(m_point.x,m_point.y-m_boxSize.cy/2);
		pDC->MoveTo(m_point.x,m_point.y+10);
		pDC->LineTo(m_point.x,m_point.y+m_boxSize.cy/2);
	}
	pDC->MoveTo(m_point.x-(m_boxSize.cx/2),m_point.y-(m_boxSize.cy/2));
	pDC->LineTo(m_point.x+(m_boxSize.cx/2),m_point.y-(m_boxSize.cy/2));
	pDC->LineTo(m_point.x+(m_boxSize.cx/2),m_point.y+(m_boxSize.cy/2));
	pDC->LineTo(m_point.x-(m_boxSize.cx/2),m_point.y+(m_boxSize.cy/2));
	pDC->LineTo(m_point.x-(m_boxSize.cx/2),m_point.y-(m_boxSize.cy/2));
	EndPaint(&paintstruct);
}
Beispiel #10
0
BOOL CCommsPaint::OnInitDialog() 
{
	CDialog::OnInitDialog();

	CRButton* rbutton;
	int decals;
	for(int i=0;i<32;i++)
	{ 
		rbutton=GETDLGITEM(IDC_NOSEART0+i);
		if (DPlay::H2H_Player[_DPlay.mySlot].squadron < PT_GER_FLYABLE)
		{
			rbutton->ShowWindow(SW_SHOW);

			if (i < 16)
				decals = i + FIL_NOSE_STD_1;
			else
				decals = i - 16 + FIL_NOSE_USER_1;

 			rbutton->SetNormalFileNum(decals);
			rbutton->SetPressedFileNum(1);
		}else
		{
			rbutton->ShowWindow(SW_HIDE);
		}
	}

	paintshop_timer=SetTimer(DPlay::TIMER_PAINTSHOP,0,NULL); 

//DeadCode AMM 16Nov99 	_DPlay.UISendInPaintShopMessage();
//DeadCode AMM 16Nov99 	DPlay::H2H_Player[_DPlay.mySlot].status=CPS_PAINTSHOP;
	_DPlay.SendStatusChange(DPlay::CPS_PAINTSHOP);
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Beispiel #11
0
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();
}
Beispiel #12
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
}
Beispiel #13
0
BOOL CLoad::OnInitDialog()
{
    CDialog::OnInitDialog();

    PrintFileName();

    MakeFileList();
    if (acnum==LSD_LOAD || acnum==LSD_LOAD_DESELECT)
    {
    }
    else
    {
        CREdit* e=GETDLGITEM(IDC_SAVENAME);
        e->SetCaption("\b\b\x20");	//set max length of 32 characters
        e->SetCaption("\b\t\v\n\\\"\':.|¦?*");	//block these characters. Space is allowed.
    }

//	currrow = 0;
//	filename = "file0";
//	CRListBox*	l=GETDLGITEM(IDC_RLISTBOXFILE);


//	l->SetHilightRow(currrow);


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

	
//DEADCODE RDH 24/02/00 	rlistbox->AddString("Aug 8th",0);
//DEADCODE RDH 24/02/00 	rlistbox->AddString("12:45",1);
//DEADCODE RDH 24/02/00 	rlistbox->AddString("Spitfire",2);
//DEADCODE RDH 24/02/00 	rlistbox->AddString("Patrol",3);
//DEADCODE RDH 24/02/00 	rlistbox->AddString("Beachy Head. No combat",4);
//DEADCODE RDH 24/02/00 	rlistbox->AddString("0",5);
//DEADCODE RDH 24/02/00 	rlistbox->AddString("1",6);
//DEADCODE RDH 24/02/00 
//DEADCODE RDH 24/02/00 	rlistbox->AddString("Aug 9th",0);
//DEADCODE RDH 24/02/00 	rlistbox->AddString("12:45",1);
//DEADCODE RDH 24/02/00 	rlistbox->AddString("Spitfire",2);
//DEADCODE RDH 24/02/00 	rlistbox->AddString("Intercept",3);
//DEADCODE RDH 24/02/00 	rlistbox->AddString("Croydon. 200 + Ju88.",4);
//DEADCODE RDH 24/02/00 	rlistbox->AddString("0",5);
//DEADCODE RDH 24/02/00 	rlistbox->AddString("1",6);

	CREdit* edit=GETDLGITEM(IDC_NAME);
	edit->SetCaption(MMC.PlayerName);

	if (RFullPanelDial::gameside == RFullPanelDial::SIDE_LW)
	{
		LWRefreshList();
	}else
	{
		RAFRefreshList();
	}
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Beispiel #15
0
void CSSound::OnTextChangedCboSounddriver(LPCTSTR Caption, short index) 
{
	// TODO: Add your control notification handler code here
	
	{
		CRCombo* combo;
		combo=GETDLGITEM(IDC_CBO_RADIOCHATTER);

		LPDSPORTINFO temp=NULL;
		
		if (_Miles.dig && _Miles.dig->DIG_valid())
		{
			temp=_Miles.dig->PortInfo;

			while (temp && index--)
			{
				temp=temp->next;
			}
			if (temp)
			{
				Save_Data.SFXDevice=temp->port;
			}
		}
	}
}
Beispiel #16
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;
	}
}
Beispiel #17
0
BOOL LWRouteAirfield::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	CRListBox* rlistbox;
	rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL1);
	rlistbox->Clear();
	rlistbox->AddColumn(80);
	rlistbox->AddColumn(TARGETFIELDWIDTH);										  //RDH 02/06/99
	rlistbox->AddColumn(60);										  //RDH 02/06/99
	rlistbox->AddColumn(60);										  //RDH 02/06/99
	rlistbox->AddColumn(60);
	rlistbox->AddString("",0);
	rlistbox->AddString(RESSTRING(LOCATION),1);
	rlistbox->AddString(RESSTRING(ETA),2);
	rlistbox->AddString(RESSTRING(RELTOT),3);
	rlistbox->AddString(RESSTRING(FUEL),4);
	
	rlistbox->AddString("Strike",0);
	rlistbox->AddString("Wissen",1);
	rlistbox->AddString("14:00",2);
	rlistbox->AddString("-01:20",3);
	rlistbox->AddString("3000",4);

	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Beispiel #18
0
void	CDamage::FillList()
{
//DeadCode JIM 20Oct00 	int setindex=-1;
//DeadCode JIM 20Oct00 	int listlen=0;
	CRListBox*	l=GETDLGITEM(IDC_LIST_ELEMENTS);
	l->Clear();
	//Find damage info for group
	int de=numdamagedelts;
	while(de-->0)
		breakif (damagedelements[de].loadedid==groupnum);

	if (de>=0)
	{
		int specificeltdamage=de;
		UniqueID startpoint=UID_NULL;
		UniqueID findpoint=(UniqueID)wavenum;
		if (wavenum!=groupnum)
		{
			if (!DeadStream::MainWorldBand(UniqueID(groupnum)))
				startpoint=findpoint;
			findpoint=damagedelements[specificeltdamage].memberid;
		}
		DeadStream::DeadBlockItterator itt(Dead_Stream.firstblock,startpoint);
		itt.SkipToItem(findpoint);
		//list elements
		l->AddColumn(TARGETFIELDWIDTH+50);
		l->AddColumn(50);
		for (GroupItterator si(damagedelements[specificeltdamage].shape,&itt);si;si++)
		{
			if (si.DamageWeight()>IGNOREDAMAGEBELOWTHIS && si.shape!=CTRPTC && si.shape!=CRKPTC)
			{
				l->AddString(GetShapeName(si.shape)+" "+GetEltDeltaName(si.delta),0);
				l->AddString(RESLIST(DAMAGESTAT_ALIVE,((MinAnimData&)si.AnimDataByte()).itemstate),1);
			}
		}
	}
	else
	{
		l->AddColumn(TARGETFIELDWIDTH+100);
		info_itemS* p = *Persons2::SlowConvertPtrUID(UniqueID(groupnum));
		if (p)
			if (p->Status.size>=MOBILESIZE)
			{
				EventVal& type=p->shape;
				int max=(info_grndgrpPtr(*p)->inform);
				for (int i=0;i<max;i++)
					l->AddString(GetShapeName(ShapeNum(type.Evaluate(i))),0);
			}
			else
				for (GroupItterator si(ShapeNum(p->shape.Evaluate()));si;si++)
				{
					if (si.DamageWeight()>IGNOREDAMAGEBELOWTHIS && si.shape!=CTRPTC && si.shape!=CRKPTC)
					{
						l->AddString(GetShapeName(si.shape)+" "+GetEltDeltaName(si.delta),0);
					}
				}

	}
}
Beispiel #19
0
void LWDiaryDetails::OnSelectedRradiodisplay(long ButtonNum) 
{
	parent->RefreshData(0);
	CRRadio* pradio;
	pradio=GETDLGITEM(IDC_RRADIODISPLAY);
	pradio->SetCurrentSelection(0);
	
}
Beispiel #20
0
void CSQuick1::OnTextChangedEltnum(LPCTSTR text, short index) 
{

	// TODO: Add your control notification handler code here
	quickdef.plac=(quickdef.plac&-4)
					+GETDLGITEM(IDC_ELTNUM)->GetIndex();
	
}
Beispiel #21
0
void RAFReviewEnemy::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(RAFReviewEnemy)
	DDX_Control(pDX, IDC_RLISTBOXCTRL1, m_IDC_RLISTBOXCTRL1);
	//}}AFX_DATA_MAP
	GETDLGITEM(IDC_RLISTBOXCTRL1)->AddString("",0);
}
Beispiel #22
0
void QuickParameters::OnTextChangedTargtype(LPCTSTR Caption, short index) 
{
	targtype=GETDLGITEM(IDC_TARGTYPE)->GetIndex();
	targentry=0;
	CSQuick1::quickdef.target=CSQuick1::quickdef.targets[targtype][targentry];

	TargNameCombo();
}
Beispiel #23
0
void PilotLogBook::OnTextChangedName(LPTSTR text) 
{
	CREdit* edit=GETDLGITEM(IDC_NAME);
	trunc(text,PLAYERNAMELEN - 1);	

 	strcpy(Save_Data.CommsPlayerName,text);
 	strcpy(MMC.PlayerName,text);
}
Beispiel #24
0
void CBattleDetail::OnSelectRlistboxbtm(long row, long column) 
{
	CRListBox* rlistbox;

	rlistbox=GETDLGITEM(IDC_RLISTBOXBTM);
	rlistbox->SetHilightRow(-1);
	
}
Beispiel #25
0
void LWReviewAircraft::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(LWReviewAircraft)
	DDX_Control(pDX, IDC_RLISTBOXCTRL1, m_IDC_RLISTBOXCTRL1);
	//}}AFX_DATA_MAP
	GETDLGITEM(IDC_RLISTBOXCTRL1)->AddString("",0);
}
Beispiel #26
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;
	}
}
Beispiel #27
0
void CSelectSession::OnTimer(UINT nIDEvent) 
{
 	if (nIDEvent==m_timer)
	{
		ULong c1=0,c2=0;
		LPENUMSESSION temp;
		CRListBox* rlistbox;

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

		_DPlay.UIGetSessionListUpdate();

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

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

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

					KillTimer(m_timer);

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

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

//		if (currsessrow>=0)
//		{
//			rlistbox->SetHilightRow(currsessrow);
//		}
	}
	CDialog::OnTimer(nIDEvent);
}
Beispiel #28
0
void PilotLogBook::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(PilotLogBook)
	DDX_Control(pDX, IDC_RLISTBOXCTRL1, m_IDC_RLISTBOXCTRL1);
	DDX_Control(pDX, IDC_NAME, m_IDC_NAME);
	//}}AFX_DATA_MAP
	GETDLGITEM(IDC_RLISTBOXCTRL1)->AddString("",0);
}
Beispiel #29
0
void CMiscToolbar::ChildDialClosed(int dialnum,RDialog*,int rv)
{
	if (dialids[dialnum] && dialnum!=DIRECTIVESTOGGLE)
	{
		GETDLGITEM(dialids[dialnum])->SetPressed(FALSE);
		if (dialnum==0)
			CMIGView::m_thumbnail=NULL;
	}
}
Beispiel #30
0
void CSCampaign::RefreshDate(int camp)
{
	CRButton*   s;
   	
	s=GETDLGITEM(IDC_RBUTTONDATE);
	s->SetString(LoadResString(IDS_L_SCAMPAIGNDATE1+camp));


}