Пример #1
0
STDMETHODIMP CPreviewPlugin::Configure(void)
{
	CConfigDlg dlg;
	dlg.DoModal();

	return S_OK;
}
Пример #2
0
ICQ_EXPORT void configure(IcqProfile *profile)
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState());

	CConfigDlg dlg;
	dlg.m_enable = alarmEnabled;
	dlg.m_date = alarmTime;
	dlg.m_time = alarmTime;
	dlg.m_text = alarmText.c_str();

	if (dlg.DoModal() != IDOK)
		return;

	alarmEnabled = dlg.m_enable;
	alarmTime = CTime(dlg.m_date.GetYear(), dlg.m_date.GetMonth(), dlg.m_date.GetDay(),
		dlg.m_time.GetHour(), dlg.m_time.GetMinute(), dlg.m_time.GetSecond());
	alarmText = dlg.m_text;

	profile->writeBool("enable", alarmEnabled ? true : false);
	profile->writeInt("year", alarmTime.GetYear());
	profile->writeInt("month", alarmTime.GetMonth());
	profile->writeInt("day", alarmTime.GetDay());
	profile->writeInt("hour", alarmTime.GetHour());
	profile->writeInt("minute", alarmTime.GetMinute());
	profile->writeInt("second", alarmTime.GetSecond());
	profile->writeString("text", alarmText.c_str());

	if (alarmEnabled)
		setTimer(alarmTime);
}
Пример #3
0
void CAnyChatVideoMixerDlg::OnButtonConfig() 
{
	CConfigDlg dlg;
	if(dlg.DoModal() == IDOK)
	{
		::EnterCriticalSection(&m_hMapSection);
		if(m_lpMixVideoBuf)
		{
			free(m_lpMixVideoBuf);
			m_lpMixVideoBuf = NULL;
		}
		m_dwMixImageSize = g_localSettings.dwWidth * g_localSettings.dwHeight * 3 / 2;
		m_lpMixVideoBuf = (CHAR*)malloc(m_dwMixImageSize);
		::LeaveCriticalSection(&m_hMapSection);

		SetLocalVideoParamters();
		// 重新设置输入格式
		BRAC_SetInputVideoFormat(BRAC_PIX_FMT_YUV420P, g_localSettings.dwWidth, g_localSettings.dwHeight, g_localSettings.dwFrameRate, 0);
	
		m_dwAudioStartTime = 0;
		m_dwAlreadInputAudioSamples = 0;
	}
}
Пример #4
0
BOOL CMonitorApp::InitInstance()
{
	if (!AfxSocketInit())
	{
		AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
		return FALSE;
	}

	AfxEnableControlContainer();

	CWnd *pWnd = CWnd::FindWindow(NULL, _T("三九前置采集服务器"));
	if( pWnd != NULL )
	{
		return FALSE;
	}

#ifdef _AFXDLL
	Enable3dControls();	
#else
	Enable3dControlsStatic();
#endif

	SetRegistryKey(_T("Smart Monitor"));

    TCHAR  szModule[MAX_PATH];

	GetModuleFileName(NULL, szModule, MAX_PATH);
	for(long i=lstrlen(szModule)-1; i>=0; i--)
	{
		if( szModule[i] == '\\' )
		{
			szModule[i] = '\0' ;
			break;
		}
	}

	SetCurrentDirectory(szModule);

	lstrcpy(strCurDir, szModule);
	wsprintf(strServerINI, "%s\\SmartServer.ini", szModule);
	wsprintf(strSmartServer, "%s\\SmartServer.EXE", szModule);
	wsprintf(strSmartTemp, "%s\\SmartTemp.dat", szModule);

	if( strcmp(m_lpCmdLine, "config") )
	{
		CMainFrame* pFrame = new CMainFrame;
		m_pMainWnd = pFrame;

		pFrame->LoadFrame(IDR_MAINFRAME,
			WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL,
			NULL);

		m_pMainWnd->ShowWindow(SW_HIDE);
		m_pMainWnd->UpdateWindow();
	}
	else
	{
		CConfigDlg dlg;
		m_pMainWnd = &dlg;
		dlg.DoModal();

	}
	return TRUE;
}