예제 #1
0
void CShellDlg::OnStnClickedPicjia()
{
    if(m_QQ .GetLength ()==0  || m_myPassword.GetLength ()==0)
    {
        CDlgLogin dlgLogin;
        INT_PTR nLoginRes=dlgLogin.DoModal ();
        if(nLoginRes==IDOK)
        {
            this->m_QQ =dlgLogin.m_QQ ;
            this->m_myPassword =dlgLogin.m_password ;
            m_WebMain .Navigate ("http://pc.11343777.com/Video/Main.aspx?idd="+m_QQ+"&pw="+m_myPassword,NULL,NULL,NULL,NULL);
            m_picJia .ShowWindow (SW_HIDE);
            m_isShowJia=false;
        }
    }
}
예제 #2
0
void CMorphwizardDoc::Serialize(CArchive& ar)
{
	if (ar.IsStoring())
	{
	}
	else
	{
	   	// ask username
		CDlgLogin dlgLogin;
		if( dlgLogin.DoModal() != IDOK )
			throw CExpc("No login information");

		CGriIni cIni;
		cIni.Init();
		CWizardProgressMeter meter(m_Wizard);
		bool ret = GetWizard()->load_wizard(ar.GetFile()->GetFilePath(), dlgLogin.m_name);
		
		SetInputLanguage(GetWizard()->m_Language);

		cIni.Exit();
	}
}
예제 #3
0
// CViewBarApp initialization
BOOL CViewBarApp::InitInstance()
{
	//enable leak check
#ifdef DEBUG
	_CrtSetDbgFlag( _CRTDBG_REPORT_FLAG); 
#endif
	

	// InitCommonControlsEx() is required on Windows XP if an application
	// manifest specifies use of ComCtl32.dll version 6 or later to enable
	// visual styles.  Otherwise, any window creation will fail.
	INITCOMMONCONTROLSEX InitCtrls;
	InitCtrls.dwSize = sizeof(InitCtrls);
	// Set this to include all the common control classes you want to use
	// in your application.
	InitCtrls.dwICC = ICC_WIN95_CLASSES;
	InitCommonControlsEx(&InitCtrls);

	CWinApp::InitInstance();

	AfxEnableControlContainer();

	// single instance, esp. for XP users
	if (LockFile() == FALSE)
	{
		//CString msg, title;
		//msg.LoadString(IDS_WARNING_MULTIINTANCE);

		//AfxMessageBox(msg, MB_ICONWARNING);

		CAppBarManager::GetInstance()->OnMultiInstance();

		return FALSE;
	}


	// Standard initialization
	// If you are not using these features and wish to reduce the size
	// of your final executable, you should remove from the following
	// the specific initialization routines you do not need
	// Change the registry key under which our settings are stored
	// TODO: You should modify this string to be something appropriate
	// such as the name of your company or organization
	SetRegistryKey(_T("Agloco Viewbar"));

	// initialize com
	CoInitialize(NULL);


	thePrefs.LoadConfigFromRegistry();

//#ifdef DEBUG
	g_log.Open(_T("log.txt"));
//#endif

	// single instance
	if (g_SingleInstanceObj.IsAnotherInstanceRunning()) 
		return FALSE;

	//// Update
	//CUpdater updater;
	//updater.AutoUpdate();

	// initialization
	CUISubject::GetInstance();

	// lang
	CLangManager::GetInstance()->GetDefaultLanguage();

	// skin
	CSkinManager::GetInstance();

	// ViewBar session
	http::CVBSession::GetInstance();

	// SearchEngine
	CSearchManager::GetInstance();

	// Advertisement
	CAdsManager::GetInstance();

	// SQLite
	CCppSQLiteManager::GetInstance();

	// Appbar Manager
	CAppBarManager::GetInstance();

	CDataStore::GetInstance();

	CMyUtility::m_uProcessMsg = RegisterWindowMessage(_T("78910EFA-50F9-4f7d-A66E-A8365C60140B"));
	
	GetUserInfo();

	CDlgLogin dlg;

	if (IsAutoLogin())
	{
		dlg.SetAutoLogin();
	}
	m_pMainWnd = &dlg;

	// log
	g_log.OutputDebug(_T("++++++++++++++++++++++++++++++++++++++++++++++APPLICATION START+++++++++++++++++++++++++++++++++++++++++++++++"));

	INT_PTR nResponse = dlg.DoModal();
	if (nResponse == IDOK)
	{
		// TODO: Place code here to handle when the dialog is
		// dismissed with OK
	}
	else if (nResponse == IDCANCEL)
	{
		// TODO: Place code here to handle when the dialog is
		//  dismissed with Cancel
	}

	// Since the dialog has been closed, return FALSE so that we exit the
	//  application, rather than start the application's message pump.
	return FALSE;
}