Example #1
0
//////////////////////////////////////////////////////////////////////
// TThingEditDialog
// ----------
//
void TThingEditDialog::ObjectsClicked ()
{
	ThingSet = kodObject;
	if (CurThing.type < kodObject)
		CurThing.type = kodObject;
	SetupListBox ();
}
Example #2
0
void TThingEditDialog::SelectFromEntrancesClicked ()
{
  // Disabled 7/3/04 ARK.  See comment in windeu.cpp about entrances
#if 0  
	int startExitRoomID = CurThing.when;
	int exitRoomID,exitRow,exitCol,exitAngle;
	int id = SelectEntrance(this,startExitRoomID,CurThing.id,&exitRoomID,&exitRow,&exitCol,&exitAngle);
	if (id >= 0)
	{
		int roomIndex = GetKodIndexFromID(exitRoomID);
		if (roomIndex >= 0)
		{
			char tmp[256];
			sprintf (tmp, "%d", exitCol);
			pXExit->SetText(tmp);
			sprintf (tmp, "%d", exitRow);
			pYExit->SetText(tmp);
			pExitRoomID->SetSelIndex(pExitRoomID->FindString(GetKodRoomDecorativeName(roomIndex),-1));
			CurThing.xExitPos = exitCol;
			CurThing.yExitPos = exitRow;
			CurThing.id = id;
			CurThing.angle = exitAngle;
			CurThing.when = exitRoomID;
			SetAngle();
			SetupListBox();
		}
	}
#endif
}
Example #3
0
//////////////////////////////////////////////////////////////////////
// TThingEditDialog
// ----------
//
void
TThingEditDialog::SetupWindow ()
{
	TDialog::SetupWindow();
	::CenterWindow (this);

	// Retreive thing set and setup check boxes
	InitThingSet ();

	// Add thing types of thing set in list box
	SetupListBox();

	// Set angle and appearence boxes
	SetAngle();

	// Insert thing position in edit boxes
	char tmp[20];
	sprintf (tmp, "%d", CurThing.xpos);
	pXPosEdit->SetText(tmp);

	sprintf (tmp, "%d", CurThing.ypos);
	pYPosEdit->SetText(tmp);

	sprintf (tmp, "%d", CurThing.xExitPos);
	pXExit->SetText(tmp);

	sprintf (tmp, "%d", CurThing.yExitPos);
	pYExit->SetText(tmp);

	pComment->SetText(CurThing.comment);
}
void CDlgPlayfairAnalysis::UpdateListBox()
{
	m_listview.ShowWindow(SW_HIDE);
	SetupListBox();
	m_listview.ShowWindow(SW_SHOW);
	int i = SetupAnalysisWindow();
	ScrollRange( i );
} 
BOOL CDlgPlayfairAnalysis::OnInitDialog() 
{
	CDialog::OnInitDialog();
	// m_listview in Report-Mode initialisieren

	m_Font.CreateFont(0,0,0,0,0,0,0,0,DEFAULT_CHARSET,OUT_RASTER_PRECIS,0,DEFAULT_QUALITY,FIXED_PITCH|FF_DONTCARE,NULL);
	m_ciphfeld.SetFont(&m_Font);
	m_txtfeld.SetFont(&m_Font);

	int colWidth = 55;  // Spaltenbreite in Pixel


	m_listview.InsertColumn( 0, " ", LVCFMT_LEFT, colWidth-30 , 0); // Buchstabe
	m_listview.InsertColumn( 1, "LROU", LVCFMT_LEFT, colWidth , 3); // 
	m_listview.InsertColumn( 2, "Nb?", LVCFMT_LEFT, colWidth , 3); // 
	LoadString(AfxGetInstanceHandle(),IDS_STRING_HORIZ,pc_str,STR_LAENGE_STRING_TABLE);
	m_listview.InsertColumn( 3, pc_str, LVCFMT_LEFT, colWidth+30 , 1); // 
	LoadString(AfxGetInstanceHandle(),IDS_STRING_VERT,pc_str,STR_LAENGE_STRING_TABLE);
	m_listview.InsertColumn( 4, pc_str, LVCFMT_LEFT, colWidth+30 , 2); // 
	m_listview.InsertColumn( 5, "row or col?", LVCFMT_LEFT, colWidth+60 , 3); // 
	m_listview.InsertColumn( 6, "Metrik", LVCFMT_LEFT, colWidth , 3); // 

	m_bHScroll = FALSE;
	m_iPos = 0;

	InitListBox();
	SetupListBox();
	SetupAnalysisWindow();

	// read window rects at dialog initialization
	GetWindowRect(&initialRectDialog);
	GetDlgItem(IDC_PLAYFAIR_LIST)->GetWindowRect(&initialRectListLetterInformation);
	GetDlgItem(IDC_LIST)->GetWindowRect(&initialRectFieldResult);
	GetDlgItem(IDC_MYTXT)->GetWindowRect(&initialRectFieldPlaintext);
	GetDlgItem(IDCANCEL)->GetWindowRect(&initialRectButtonCancel);
	GetDlgItem(IDC_SCROLLBAR1)->GetWindowRect(&initialRectScrollbar);

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX-Eigenschaftenseiten sollten FALSE zurückgeben
}
Example #6
0
void TThingEditDialog::MonsterGenClicked ()
{
	ThingSet = kodMonsterGenerator;
	CurThing.type = kodMonsterGenerator;
	SetupListBox ();
}
Example #7
0
void TThingEditDialog::EntranceClicked()
{
	ThingSet = kodEntrance;
	CurThing.type = kodEntrance;
	SetupListBox ();
}
Example #8
0
//////////////////////////////////////////////////////////////////////
// TThingEditDialog
// ----------
//
void TThingEditDialog::ExitClicked ()
{
	ThingSet = kodExit;
	CurThing.type = kodExit;
	SetupListBox ();
}
Example #9
0
//////////////////////////////////////////////////////////////////////
// TThingEditDialog
// ----------
//
void TThingEditDialog::PlayerClicked ()
{
	ThingSet = kodPlayerBlocking;
	CurThing.type = kodPlayerBlocking;
	SetupListBox ();
}