Пример #1
0
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
		return -1;

	if (!m_TrayIcon.Create(this, WM_ICON_NOTIFY, GUI_APP_CAPTION, theApp.LoadIcon(IDI_SMALL_PASS), IDR_MAINFRAME))
		return -1;

	theApp.SetTrayIcon();

	if(!m_TrayIcon.SetMenuDefaultItem(2,TRUE))
		return -1;
	
	DWORD dwFlags;
	if(InternetGetConnectedState(&dwFlags, 0))
		theApp.m_DownloadCommand.InitNetCommand();
	else
		SetTimer(1, 600000, NULL);

	if(!theApp.m_RegisterRequest.m_IsUploaded)
		SetTimer(2, 300000, NULL);

	// CG: The following line was added by the Splash Screen component.
	CSplashWnd::ShowSplashScreen(this);

	return 0;
}
Пример #2
0
int CMainDlg::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CPasseckDialog::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	if (!m_TrayIcon.Create(this, WM_ICON_NOTIFY, GUI_APP_CAPTION, theApp.LoadIcon(IDI_SMALL_PASS), IDR_MAINFRAME))
		return -1;

	if(!m_TrayIcon.SetMenuDefaultItem(0, TRUE))
		return -1;
	
	CSplashWnd::ShowSplashScreen(this);

	return 0;
}