Exemplo n.º 1
0
void ExtentDlg::OnInitDialog(wxInitDialogEvent& event)
{
	GetDMS()->Enable(m_bDegrees);

	FormatStrings(1);
	FormatStrings(2);

	wxWindow::OnInitDialog(event);
}
Exemplo n.º 2
0
void ExtentDlg::OnDMS( wxCommandEvent &event )
{
	if (m_bSetting) return;

	TransferDataFromWindow();
	FormatStrings(1);
}
Exemplo n.º 3
0
void ExtentDlg::OnExtentN( wxCommandEvent &event )
{
	if (m_bSetting) return;

	TransferDataFromWindow();
	m_area.top = GetValueFrom(m_strNorth);
	FormatStrings(2);
}
Exemplo n.º 4
0
void ExtentDlg::OnExtentW( wxCommandEvent &event )
{
	if (m_bSetting) return;

	TransferDataFromWindow();
	m_area.left = GetValueFrom(m_strWest);
	FormatStrings(2);
}
Exemplo n.º 5
0
void WINAPI FormatString2(LPTSTR lpszDest, LPCTSTR lpszFormat, LPCTSTR lpsz1,
        LPCTSTR lpsz2)
{
        LPCTSTR rglpsz[2];
        rglpsz[0] = lpsz1;
        rglpsz[1] = lpsz2;
        FormatStrings(lpszDest, lpszFormat, rglpsz, 2);
}
Exemplo n.º 6
0
LTBOOL CCredit::Init(char* sBuf)
{
	// Sanity checks...

	if (!sBuf) return(LTFALSE);

	// Set simple members...

	m_nState    = CS_START;

	s_bPause    = LTFALSE;

	m_Pos.x		= 320;
	m_Pos.y		= 240;
	m_ePosition	= CP_CENTER;
	m_bBig		= LTFALSE;
	m_hAlign = CUI_HALIGN_CENTER;

	// Parse the text buffer and add each line as a separate string...

	char sString[256];
	int  i = 0;

	while (*sBuf)
	{
		if ((*sBuf == '\n') || (*sBuf == '\r') || (*sBuf == '\0'))
		{
			sString[i] = '\0';
			AddString(sString); 
			i = 0;

			while (((*sBuf == '\n') || (*sBuf == '\r'))) 
			{
				sBuf = (char*)_mbsinc((const unsigned char*)sBuf);
			};
		}
		else
		{
			int nCount = _mbsnbcnt((const unsigned char*)sBuf,1);
			memcpy(&sString[i], sBuf, nCount);
			i += nCount;
			sBuf = (char*)_mbsinc((const unsigned char*)sBuf);
		}
	}
	sString[i] = '\0';
	if (strlen(sString) > 0) AddString(sString);

	// All done...
	FormatStrings();

	return(LTTRUE);
}
Exemplo n.º 7
0
void ExtentDlg::OnExtentAll( wxCommandEvent &event )
{
	if (m_bSetting) return;

	TransferDataFromWindow();
	double d1, d2, d3, d4;
	int ret = sscanf(m_strAll.mb_str(wxConvUTF8), "(%lf, %lf), (%lf, %lf)",
		&d1, &d2, &d3, &d4);
	if (ret == 4)
	{
		m_area.left = d1;
		m_area.right = d1 + d3;
		m_area.bottom = d2;
		m_area.top = d2 + d4;
		FormatStrings(1);
	}
}
Exemplo n.º 8
0
void WINAPI FormatString1(LPTSTR lpszDest, LPCTSTR lpszFormat, LPCTSTR lpsz1)
{
        FormatStrings(lpszDest, lpszFormat, &lpsz1, 1);
}