예제 #1
0
파일: SSOUND.CPP 프로젝트: gondur/BOB_Src
void CSSound::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CSSound)
	DDX_Control(pDX,IDC_SDETAIL1,m_IDC_SDETAIL1);
	DDX_Control(pDX,IDC_RSTATICCTRL2,m_IDC_RSTATICCTRL2);
	DDX_Control(pDX,IDC_RSTATICCTRL3,m_IDC_RSTATICCTRL3);
	DDX_Control(pDX,IDC_RSTATICCTRL4,m_IDC_RSTATICCTRL4);
	DDX_Control(pDX,IDC_CBO_MUSIC,m_IDC_CBO_MUSIC);
	DDX_Control(pDX,IDC_CBO_SFX,m_IDC_CBO_SFX);
	DDX_Control(pDX,IDC_CBO_SFX2,m_IDC_CBO_SFX2);
	DDX_Control(pDX,IDC_CBO_SFX3,m_IDC_CBO_SFX3);
	DDX_Control(pDX,IDC_CBO_RADIOCHATTER,m_IDC_CBO_RADIOCHATTER);
	DDX_Control(pDX,IDC_CBO_ENGINESOUND,m_IDC_CBO_ENGINESOUND);
	DDX_Control(pDX,IDC_CBO_AUTOVECTORING,m_IDC_CBO_AUTOVECTORING);
	DDX_Control(pDX, IDC_CBO_RAFVOICE, m_IDC_CBO_RAFVOICE);
	DDX_Control(pDX, IDC_CBO_RADIOQUALITY, m_IDC_CBO_RADIOQUALITY);
	DDX_Control(pDX, IDC_CBO_LWVOICE, m_IDC_CBO_LWVOICE);
	DDX_Control(pDX, IDC_CBO_SOUNDDRIVER, m_IDC_CBO_SOUNDDRIVER);
	DDX_Control(pDX, IDC_CBO_MUSICDRIVER, m_IDC_CBO_MUSICDRIVER);
	DDX_Control(pDX, IDC_CBO_SFXPROCESSING, m_IDC_CBO_SFXPROCESSING);
	//}}AFX_DATA_MAP
#define	SG2C_DISPLAY setlevel
#include "sg2combo.h"
	OPTIONS	
//		m_IDC_CBO_MUSIC.SetCircularStyle(TRUE);
//		m_IDC_CBO_SFX.SetCircularStyle(TRUE);
//		m_IDC_CBO_RADIOCHATTER.SetCircularStyle(TRUE);
//		m_IDC_CBO_ENGINESOUND.SetCircularStyle(TRUE);
//		m_IDC_CBO_GEFFECTS.SetCircularStyle(TRUE);
//		m_IDC_CBO_INJURYEFFECTS.SetCircularStyle(TRUE);
//		m_IDC_CBO_WHITEOUTS.SetCircularStyle(TRUE);
//		m_IDC_CBO_AUTOVECTORING.SetCircularStyle(TRUE);


//DEADCODE RDH 24/11/99 		m_IDC_CBO_MUSIC.SetCircularStyle(TRUE);						  //RDH 03/04/99
//DEADCODE RDH 24/11/99 		m_IDC_CBO_SFX.SetCircularStyle(TRUE);
//DEADCODE RDH 24/11/99 		m_IDC_CBO_SFX2.SetCircularStyle(TRUE);
//DEADCODE RDH 24/11/99 		m_IDC_CBO_SFX3.SetCircularStyle(TRUE);
//DEADCODE RDH 24/11/99 		m_IDC_CBO_RADIOCHATTER.SetCircularStyle(TRUE);
//DEADCODE RDH 24/11/99 		m_IDC_CBO_ENGINESOUND.SetCircularStyle(TRUE);
//DEADCODE RDH 24/11/99 		m_IDC_CBO_GEFFECTS.SetCircularStyle(TRUE);
//DEADCODE RDH 24/11/99 		m_IDC_CBO_INJURYEFFECTS.SetCircularStyle(TRUE);
//DEADCODE RDH 24/11/99 		m_IDC_CBO_WHITEOUTS.SetCircularStyle(TRUE);
//DEADCODE RDH 24/11/99 		m_IDC_CBO_AUTOVECTORING.SetCircularStyle(TRUE);				  //RDH 03/04/99
		
		if (!_Miles.IsEnabled(SOUND_DIGITAL))
		{
			GETDLGITEM(IDC_CBO_SFX)->Clear();
			GETDLGITEM(IDC_CBO_SFX)->AddString(RESSTRING(NOTAVAILABLE));
			GETDLGITEM(IDC_CBO_SFX)->SetIndex(0);
			GETDLGITEM(IDC_CBO_SFX)->Clear();
			if (	_Miles.digerror
				&&	ULongP(_Miles.digerror)[0]==*(int*)"Dire"
				&&	ULongP(_Miles.digerror)[1]==*(int*)"ctSo"
				)
				GETDLGITEM(IDC_CBO_SFX)->AddString(CString("DS:")+(_Miles.digerror+11));
			else
				GETDLGITEM(IDC_CBO_SFX)->AddString(_Miles.digerror);
		}
		if (!_Miles.IsEnabled(SOUND_MIDI))
		{
			GETDLGITEM(IDC_CBO_MUSIC)->Clear();
			GETDLGITEM(IDC_CBO_MUSIC)->AddString(RESSTRING(NOTAVAILABLE));
			GETDLGITEM(IDC_CBO_MUSIC)->SetIndex(0);
		}
		if (!_Miles.IsEnabled(SOUND_RADIO))						//DAW 18Aug99
		{
			GETDLGITEM(IDC_CBO_RADIOCHATTER)->Clear();
			GETDLGITEM(IDC_CBO_RADIOCHATTER)->AddString(RESSTRING(NOTAVAILABLE));
			GETDLGITEM(IDC_CBO_RADIOCHATTER)->SetIndex(0);
		}


//	calib=GetDlgItem(IDC_CALIB2);
//	calib->SetCaption(RESSTRING(CONFIG));

}
예제 #2
0
//================================================
// SetText
//================================================
STDMETHODIMP CJMBrkr::SetText(BSTR szText)
{
    // Immediately update the tip text
    SetShellTipText(CString(szText));
	return S_OK;
}
예제 #3
0
DWORD CHooks::RunScript(CString cmd, LPCTSTR currentDir, CString& error, bool bWait, bool bShow)
{
	DWORD exitcode = 0;
	SECURITY_ATTRIBUTES sa;
	SecureZeroMemory(&sa, sizeof(sa));
	sa.nLength = sizeof(sa);
	sa.bInheritHandle = TRUE;

	CAutoFile hOut ;
	CAutoFile hRedir;
	CAutoFile hErr;

	// clear the error string
	error.Empty();

	// Create Temp File for redirection
	TCHAR szTempPath[MAX_PATH];
	TCHAR szOutput[MAX_PATH];
	TCHAR szErr[MAX_PATH];
	GetTortoiseGitTempPath(_countof(szTempPath), szTempPath);
	GetTempFileName(szTempPath, _T("git"), 0, szErr);

	// setup redirection handles
	// output handle must be WRITE mode, share READ
	// redirect handle must be READ mode, share WRITE
	hErr   = CreateFile(szErr, GENERIC_WRITE, FILE_SHARE_READ, &sa, CREATE_ALWAYS, FILE_ATTRIBUTE_TEMPORARY,	0);

	if (!hErr)
		return (DWORD)-1;

	hRedir = CreateFile(szErr, GENERIC_READ, FILE_SHARE_WRITE, 0, OPEN_EXISTING, 0, 0);

	if (!hRedir)
		return (DWORD)-1;

	GetTempFileName(szTempPath, _T("git"), 0, szOutput);
	hOut   = CreateFile(szOutput, GENERIC_WRITE, FILE_SHARE_READ, &sa, CREATE_ALWAYS, FILE_ATTRIBUTE_TEMPORARY,	0);

	if (!hOut)
		return (DWORD)-1;

	// setup startup info, set std out/err handles
	// hide window
	STARTUPINFO si;
	SecureZeroMemory(&si, sizeof(si));
	si.cb = sizeof(si);
	if (hOut  != INVALID_HANDLE_VALUE)
	{
		si.dwFlags     = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
		si.hStdOutput  = hOut;
		si.hStdError   = hErr;
		si.wShowWindow = bShow ? SW_SHOW : SW_HIDE;
	}

	PROCESS_INFORMATION pi;
	SecureZeroMemory(&pi, sizeof(pi));

	DWORD dwFlags = 0;

	if (!CreateProcess(NULL, cmd.GetBuffer(), NULL, NULL, TRUE, dwFlags, NULL, currentDir, &si, &pi))
	{
			int err = GetLastError();  // preserve the CreateProcess error
			error = CFormatMessageWrapper(err);
			SetLastError(err);
			cmd.ReleaseBuffer();
			return (DWORD)-1;
	}
	cmd.ReleaseBuffer();

	CloseHandle(pi.hThread);

	// wait for process to finish, capture redirection and
	// send it to the parent window/console
	if (bWait)
	{
		DWORD dw;
		char buf[256];
		do
		{
			SecureZeroMemory(&buf,sizeof(buf));
			while (ReadFile(hRedir, &buf, sizeof(buf)-1, &dw, NULL))
			{
				if (dw == 0)
					break;
				error += CString(CStringA(buf,dw));
				SecureZeroMemory(&buf,sizeof(buf));
			}
		} while (WaitForSingleObject(pi.hProcess, 0) != WAIT_OBJECT_0);

		// perform any final flushing
		while (ReadFile(hRedir, &buf, sizeof(buf)-1, &dw, NULL))
		{
			if (dw == 0)
				break;

			error += CString(CStringA(buf, dw));
			SecureZeroMemory(&buf,sizeof(buf));
		}
		WaitForSingleObject(pi.hProcess, INFINITE);
		GetExitCodeProcess(pi.hProcess, &exitcode);
	}
	CloseHandle(pi.hProcess);
	DeleteFile(szOutput);
	DeleteFile(szErr);

	return exitcode;
}