1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
   | BOOL CProjetApp::InitInstance()
{
	AfxEnableControlContainer();
 
	// 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.
 
#ifdef _AFXDLL
	Enable3dControls();			// Call this when using MFC in a shared DLL
#else
	Enable3dControlsStatic();	// Call this when linking to MFC statically
#endif
 
	// 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("Local AppWizard-Generated Applications"));
 
	CLogin login;
	//	CDatabase db;
	//	char  source[] ="DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;PORT=3306;DATABASE=RFID;USER=root;PASSWORD=;OPTION=0;";
 
//	if (db.connect(source))
//	{
		if(login.DoModal() == IDOK)
		{
			m_Login = login.m_Login;
			m_Password = login.m_Password;
		}
		else 
		{
			return -1;
		}
		CVerification Verif;
		Verif.Create(IDD_CheckLaptopOwner, NULL);
		Verif.ShowWindow(SW_SHOW);
		Verif.SetFocus();
 
//	}
	return false;
} |