• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ ProcessShellCommand函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中ProcessShellCommand函数的典型用法代码示例。如果您正苦于以下问题:C++ ProcessShellCommand函数的具体用法?C++ ProcessShellCommand怎么用?C++ ProcessShellCommand使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ProcessShellCommand函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: sizeof

BOOL CPearlImageApp::InitInstance() {
  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);

  __super::InitInstance();
  EnableTaskbarInteraction(FALSE);

  // Change the registry key under which our settings are stored.
  SetRegistryKey(_T("JGMData"));

  LoadStdProfileSettings(16);  // Load standard INI file options (including MRU)

  CSingleDocTemplate *pDocTemplate;
  pDocTemplate = new CSingleDocTemplate(
      IDR_MAINFRAME,
      RUNTIME_CLASS(CPearlImageDoc),
      RUNTIME_CLASS(CMainFrame),       // main SDI frame window
      RUNTIME_CLASS(CPearlImageView));
  AddDocTemplate(pDocTemplate);

  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  if(!ProcessShellCommand(cmdInfo)) {
    return FALSE;
  }

  TCHAR **argv = __targv;
  argv++;
  if(*argv) {
    getMainFrame()->loadFile(*argv);
  }

  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();

  return TRUE;
}
开发者ID:JesperMikkelsen,项目名称:Big-Numbers,代码行数:42,代码来源:PearlImage.cpp


示例2: AfxEnableControlContainer

BOOL CGuiMPIRunApp::InitInstance()
{
	AfxEnableControlContainer();

	AfxInitRichEdit();

	// Standard initialization

#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.
	//SetRegistryKey(_T("Local AppWizard-Generated Applications"));

	//LoadStdProfileSettings(0);  // Load standard INI file options (including MRU)

	// Register document templates

	CSingleDocTemplate* pDocTemplate;
	pDocTemplate = new CSingleDocTemplate(
		IDR_MAINFRAME,
		RUNTIME_CLASS(CGuiMPIRunDoc),
		RUNTIME_CLASS(CMainFrame),       // main SDI frame window
		RUNTIME_CLASS(CGuiMPIRunView));
	AddDocTemplate(pDocTemplate);

	// Parse command line for standard shell commands, DDE, file open
	CCommandLineInfo cmdInfo;
	ParseCommandLine(cmdInfo);

	// Dispatch commands specified on the command line
	if (!ProcessShellCommand(cmdInfo)) 
	    return FALSE;
	m_pMainWnd->ShowWindow(SW_SHOW);
	m_pMainWnd->SetWindowText("guiMPIRun");
	m_pMainWnd->UpdateWindow();

	return TRUE;
}
开发者ID:hpc,项目名称:mvapich-cce,代码行数:42,代码来源:guiMPIRun.cpp


示例3: AfxEnableControlContainer

BOOL CRobotApp::InitInstance()
{
	AfxEnableControlContainer();

	// Standard initialization
	// Change the registry key under which our settings are stored.
	//SetRegistryKey(_T("Local AppWizard-Generated Applications"));
	SetRegistryKey(_T("SAPR Robot"));

	LoadStdProfileSettings(8);  // Load standard INI file options (including MRU)

	// Register document templates

	CSingleDocTemplate* pDocTemplate;
	pDocTemplate = new CSingleDocTemplate(
		IDR_MAINFRAME,
		RUNTIME_CLASS(CRobotDoc),
		RUNTIME_CLASS(CMainFrame),       // main SDI frame window
		RUNTIME_CLASS(CRobotView));
	AddDocTemplate(pDocTemplate);

	// Enable DDE Execute open
	EnableShellOpen();
	RegisterShellFileTypes(TRUE);

	// Parse command line for standard shell commands, DDE, file open
	CCommandLineInfo cmdInfo;
	ParseCommandLine(cmdInfo);

	// Dispatch commands specified on the command line
	if (!ProcessShellCommand(cmdInfo))
		return FALSE;
	m_pMainWnd->ShowWindow(SW_SHOWMAXIMIZED);
	m_pMainWnd->UpdateWindow();

	// Enable drag/drop open
	m_pMainWnd->DragAcceptFiles();

	////init shared resources
	
	return TRUE;
}
开发者ID:NomenIllisLegio,项目名称:CAD_ROBOT,代码行数:42,代码来源:robot.cpp


示例4: AfxEnableControlContainer

BOOL CSkyblue_PinTuApp::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.

	// 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"));

	LoadStdProfileSettings();  // Load standard INI file options (including MRU)

	// Register the application's document templates.  Document templates
	//  serve as the connection between documents, frame windows and views.

	CSingleDocTemplate* pDocTemplate;
	pDocTemplate = new CSingleDocTemplate(
		IDR_MAINFRAME,
		RUNTIME_CLASS(CSkyblue_PinTuDoc),
		RUNTIME_CLASS(CMainFrame),       // main SDI frame window
		RUNTIME_CLASS(CSkyblue_PinTuView));
	AddDocTemplate(pDocTemplate);

	// Parse command line for standard shell commands, DDE, file open
	CCommandLineInfo cmdInfo;

	ParseCommandLine(cmdInfo);

	// Dispatch commands specified on the command line
	if (!ProcessShellCommand(cmdInfo))
		return FALSE;

	// The one and only window has been initialized, so show and update it.
	m_pMainWnd->ShowWindow(SW_SHOW);
	m_pMainWnd->UpdateWindow();

	return TRUE;
}
开发者ID:paraler,项目名称:bashrc,代码行数:42,代码来源:skyblue_PinTu.cpp


示例5: SetRegistryKey

BOOL CContactsApp::InitInstance()
{
	// 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.
	// You should modify this string to be something appropriate
	// such as the name of your company or organization.
	SetRegistryKey(_T("Insight Companion"));

	if (FAILED(CoInitializeEx(NULL, COINIT_MULTITHREADED)))
			return FALSE; 

    BOOL b = InitHTMLControl(m_hInstance);
    InitCommonControls();


	// Register the application's document templates.  Document templates
	//  serve as the connection between documents, frame windows and views.

	CSingleDocTemplate* pDocTemplate;
	pDocTemplate = new CSingleDocTemplate(
		IDR_MAINFRAME,
		RUNTIME_CLASS(CContactsDoc),
		RUNTIME_CLASS(CMainFrame),       // main SDI frame window
		RUNTIME_CLASS(CTodayView));
	AddDocTemplate(pDocTemplate);
	// Parse command line for standard shell commands, DDE, file open
	CCommandLineInfo cmdInfo;
	ParseCommandLine(cmdInfo);

	// Dispatch commands specified on the command line
	if (!ProcessShellCommand(cmdInfo))
		return FALSE;

	// The one and only window has been initialized, so show and update it.
	m_pMainWnd->ShowWindow(SW_SHOW);
	m_pMainWnd->UpdateWindow();
	return TRUE;
}
开发者ID:pfeilbr,项目名称:repo,代码行数:42,代码来源:Contacts.cpp


示例6: AfxEnableControlContainer

BOOL CTastaturApp::InitInstance()
{
    AfxEnableControlContainer();

    // Standardinitialisierung
    // Wenn Sie diese Funktionen nicht nutzen und die Größe Ihrer fertigen
    //  ausführbaren Datei reduzieren wollen, sollten Sie die nachfolgenden
    //  spezifischen Initialisierungsroutinen, die Sie nicht benötigen, entfernen.

    // Ändern des Registrierungsschlüssels, unter dem unsere Einstellungen gespeichert sind.
    // ZU ERLEDIGEN: Sie sollten dieser Zeichenfolge einen geeigneten Inhalt geben
    // wie z.B. den Namen Ihrer Firma oder Organisation.
    SetRegistryKey(_T("Local AppWizard-Generated Applications"));

    LoadStdProfileSettings(0);  // Standard INI-Dateioptionen laden (einschließlich MRU)

    // Dokumentvorlagen der Anwendung registrieren. Dokumentvorlagen
    //  dienen als Verbindung zwischen Dokumenten, Rahmenfenstern und Ansichten.

    CSingleDocTemplate* pDocTemplate;
    pDocTemplate = new CSingleDocTemplate(
        IDR_MAINFRAME,
        RUNTIME_CLASS(CTastaturDoc),
        RUNTIME_CLASS(CMainFrame),       // Haupt-SDI-Rahmenfenster
        RUNTIME_CLASS(CTastaturView));
    AddDocTemplate(pDocTemplate);

    // Befehlszeile parsen, um zu prüfen auf Standard-Umgebungsbefehle DDE, Datei offen
    CCommandLineInfo cmdInfo;
    ParseCommandLine(cmdInfo);

    // Verteilung der in der Befehlszeile angegebenen Befehle
    if (!ProcessShellCommand(cmdInfo))
        return FALSE;

    // Das einzige Fenster ist initialisiert und kann jetzt angezeigt und aktualisiert werden.
    m_pMainWnd->ShowWindow(SW_SHOW);
    m_pMainWnd->UpdateWindow();

    return TRUE;
}
开发者ID:acpanna,项目名称:coding,代码行数:41,代码来源:Tastatur.cpp


示例7: AfxOleInit

BOOL CScadViewerApp::InitInstance()
{
	m_Settings.Initialize(_T(""));
	m_Settings.StartFileProc();
	AfxOleInit();

	// Standard initialization
/*
#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.
	SetRegistryKey(_T("Scad Soft"));

	LoadStdProfileSettings(10);  // Load standard INI file options (including MRU)
	LoadLanguage(1049);

	// Register document templates

	CSingleDocTemplate* pDocTemplate;
	pDocTemplate = new CSingleDocTemplate(
		IDR_MAINFRAME,
		RUNTIME_CLASS(CScadViewerDoc),
		RUNTIME_CLASS(CMainScadViewerFrame),       // main SDI frame window
		RUNTIME_CLASS(CScadViewerView));
	AddDocTemplate(pDocTemplate);

	// Parse command line for standard shell commands, DDE, file open
	CCommandLineInfo cmdInfo;
	ParseCommandLine(cmdInfo);
	// Dispatch commands specified on the command line
	if (!ProcessShellCommand(cmdInfo))
		return FALSE;
	//m_pMainWnd->ShowWindow(SW_SHOW);
	//m_pMainWnd->UpdateWindow();

	return TRUE;
}
开发者ID:tchv71,项目名称:ScadViewer,代码行数:41,代码来源:ScadViewer.cpp


示例8: LoadStdProfileSettings

BOOL CDibLookApp::InitInstance()
{
	// Standard initialization
	//  (if you are not using these features and wish to reduce the size
	// of your final executable, you should remove the following initialization

	LoadStdProfileSettings();  // Load standard INI file options (including MRU)

	// Register document templates which serve as connection between
	//  documents and views.  Views are contained in the specified view

	AddDocTemplate(new CMultiDocTemplate(IDR_DIBTYPE,
			RUNTIME_CLASS(CDibDoc),
			RUNTIME_CLASS(CMDIChildWnd),        // standard MDI child frame
			RUNTIME_CLASS(CDibView)));

	// create main MDI Frame window
	CMainFrame* pMainFrame = new CMainFrame;
	if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
		return FALSE;
	pMainFrame->ShowWindow(m_nCmdShow);
	pMainFrame->UpdateWindow();
	m_pMainWnd = pMainFrame;

	// enable file manager drag/drop and DDE Execute open
	m_pMainWnd->DragAcceptFiles();

	EnableShellOpen();
	RegisterShellFileTypes(TRUE);

	// Parse command line for standard shell commands, DDE, file open
	CCommandLineInfo cmdInfo;
	ParseCommandLine(cmdInfo);

	// Dispatch commands specified on the command line
	if (!ProcessShellCommand(cmdInfo))
		return FALSE;

	return TRUE;
}
开发者ID:Ghinda94,项目名称:Image-Processing-Laboratory,代码行数:40,代码来源:DIBLOOK.CPP


示例9: InitializeQTML

BOOL CSimplePlayerMFCApp::InitInstance()
{
	// 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.

	// Initialize QTML and QuickTime
	InitializeQTML(0);
	EnterMovies();

#ifdef _AFXDLL
	Enable3dControls();			// Call this when using MFC in a shared DLL
#else
	Enable3dControlsStatic();	// Call this when linking to MFC statically
#endif

	LoadStdProfileSettings(0);  // Load standard INI file options (including MRU)

	// Register the application's document templates.  Document templates
	//  serve as the connection between documents, frame windows and views.

	CSingleDocTemplate* pDocTemplate;
	pDocTemplate = new CSingleDocTemplate(
		IDR_MAINFRAME,
		RUNTIME_CLASS(CSimplePlayerMFCDoc),
		RUNTIME_CLASS(CMainFrame),       // main SDI frame window
		RUNTIME_CLASS(CSimplePlayerMFCView));
	AddDocTemplate(pDocTemplate);

	// Parse command line for standard shell commands, DDE, file open
	CCommandLineInfo cmdInfo;
	ParseCommandLine(cmdInfo);

	// Dispatch commands specified on the command line
	if (!ProcessShellCommand(cmdInfo))
		return FALSE;

	return TRUE;
}
开发者ID:fruitsamples,项目名称:mfc.win,代码行数:40,代码来源:SimplePlayerMFC.cpp


示例10: Enable3dControls

BOOL CGelMakerApp::InitInstance()
{
	if (!CPaletteApp::InitInstance())
		return FALSE;

	// Standard initialization
#ifdef _AFXDLL
	Enable3dControls();			// Call this when using MFC in a shared DLL
#else
	Enable3dControlsStatic();	// Call this when linking to MFC statically
#endif
	LoadStdProfileSettings();  // Load standard INI file options (including MRU)

	// Register document templates
	CSingleDocTemplate* pDocTemplate;
	pDocTemplate = new CSingleDocTemplate(
		IDR_MAINFRAME,
		RUNTIME_CLASS(CGelDoc),
		RUNTIME_CLASS(CMainFrame),       // main SDI frame window
		RUNTIME_CLASS(CScrollView));     // frame will decide view types
	AddDocTemplate(pDocTemplate);

	// Enable DDE Execute open
	EnableShellOpen();
	RegisterShellFileTypes(TRUE);

	// Parse command line for standard shell commands, DDE, file open
	CCommandLineInfo cmdInfo;
	ParseCommandLine(cmdInfo);

	// Dispatch commands specified on the command line
	if (!ProcessShellCommand(cmdInfo))
		return FALSE;

	// Enable drag/drop open
	m_pMainWnd->DragAcceptFiles();

	return TRUE;
}
开发者ID:AlleyCat1976,项目名称:Meridian59_103,代码行数:39,代码来源:GelMaker.cpp


示例11: EnableTaskbarInteraction

BOOL COpenGLApp::InitInstance()
{
	CWinApp::InitInstance();


	EnableTaskbarInteraction(FALSE);

	SetRegistryKey(_T("AWC"));
	LoadStdProfileSettings(0);  // Load standard INI file options (including MRU)


	// Register the application's document templates.  Document templates
	//  serve as the connection between documents, frame windows and views
	CSingleDocTemplate* pDocTemplate;
	pDocTemplate = new CSingleDocTemplate(
		IDR_MAINFRAME,
		RUNTIME_CLASS(COpenGLDoc),
		RUNTIME_CLASS(CMainFrame),       // main SDI frame window
		RUNTIME_CLASS(COpenGLView));
	if (!pDocTemplate)
		return FALSE;
	AddDocTemplate(pDocTemplate);


	// Parse command line for standard shell commands, DDE, file open
	CCommandLineInfo cmdInfo;
	ParseCommandLine(cmdInfo);

	// Dispatch commands specified on the command line.  Will return FALSE if
	// app was launched with /RegServer, /Register, /Unregserver or /Unregister.
	if (!ProcessShellCommand(cmdInfo))
		return FALSE;

	// The one and only window has been initialized, so show and update it
	m_pMainWnd->ShowWindow(SW_SHOW);
	m_pMainWnd->UpdateWindow();
	return TRUE;
}
开发者ID:AlexBelger,项目名称:OpenGL,代码行数:38,代码来源:OpenGL.cpp


示例12: Enable3dControls

BOOL CThesisApp::InitInstance()
{
	// 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("Dark2Bright Graph Tutorial"));

//	LoadStdProfileSettings(3);  // Load standard INI file options (including MRU)

	// Register the application's document templates.  Document templates
	//  serve as the connection between documents, frame windows and views.

	CMultiDocTemplate* pDocTemplate;
	pDocTemplate = new CMultiDocTemplate(
		IDR_GMLTYPE,
		RUNTIME_CLASS(CThesisDoc),
		RUNTIME_CLASS(CChildFrame), // custom MDI child frame
		RUNTIME_CLASS(CThesisView));
	AddDocTemplate(pDocTemplate);

	// create main MDI Frame window
	CMainFrame* pMainFrame = new CMainFrame;
	if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
		return FALSE;
	m_pMainWnd = pMainFrame;

	// Enable drag/drop open
	m_pMainWnd->DragAcceptFiles();

	//* Enable DDE Execute open
	EnableShellOpen();
	RegisterShellFileTypes(TRUE);
	//*/
	// Parse command line for standard shell commands, DDE, file open
	CCommandLineInfo cmdInfo;
	ParseCommandLine(cmdInfo);

	// Dispatch commands specified on the command line
	//* Avoid auto new
	if (cmdInfo.m_strFileName !="") 		
		if (!ProcessShellCommand(cmdInfo))
			return FALSE;
	//*/
	/*
	if (!ProcessShellCommand(cmdInfo))
		return FALSE;
	//*/
	// The main window has been initialized, so show and update it.
	m_nCmdShow |= SW_MAXIMIZE;
	pMainFrame->ShowWindow(m_nCmdShow);
	pMainFrame->UpdateWindow();
	
	return TRUE;
}
开发者ID:dark2bright,项目名称:beng-thesis,代码行数:65,代码来源:Thesis.cpp


示例13: AfxMessageBox

BOOL CKJMonitorApp::InitInstance()
{
	// CG: The following block was added by the Splash Screen component.

	if (!AfxSocketInit())
	{
		AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
		return FALSE;
	}

	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.

#if _MSC_VER <= 1200 // MFC 6.0 or earlier
#ifdef _AFXDLL
	Enable3dControls();			// Call this when using MFC in a shared DLL
#else
	Enable3dControlsStatic();	// Call this when linking to MFC statically
#endif
#endif // MFC 6.0 or earlier

	// 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("Xtreme Toolkit AppWizard-Generated Applications"));

	LoadStdProfileSettings();  // Load standard INI file options (including MRU)

	// Register the application's document templates.  Document templates
	//  serve as the connection between documents, frame windows and views.

	CSingleDocTemplate* pDocTemplate;
	pDocTemplate = new CSingleDocTemplate(
		IDR_MAINFRAME,
		RUNTIME_CLASS(CKJMonitorDoc),
		RUNTIME_CLASS(CMainFrame),       // main SDI frame window
		RUNTIME_CLASS(CKJMonitorView));
	AddDocTemplate(pDocTemplate);

	// Parse command line for standard shell commands, DDE, file open
	CCommandLineInfo cmdInfo;
	ParseCommandLine(cmdInfo);

	// Dispatch commands specified on the command line
	if (!ProcessShellCommand(cmdInfo))
		return FALSE;

	// The one and only window has been initialized, so show and update it.
	//在win98下改变字体
	LOGFONT lf;
	xtAfxData.font.GetLogFont(&lf);
	lf.lfHeight = 12;
	strcpy(lf.lfFaceName,_T("宋体"));
	CFont font;
	font.CreateFontIndirect(&lf);
	xtAfxData.SetGlobalFont(&font);
			
	m_pMainWnd->ShowWindow(SW_SHOWMAXIMIZED);
	m_pMainWnd->UpdateWindow();

	return TRUE;
}
开发者ID:xiaoyugm,项目名称:chtproject,代码行数:66,代码来源:KJMonitor.cpp


示例14: AfxMessageBox

BOOL CBCGPGanttDemoApp::InitInstance()
{
    // Initialize OLE libraries
    if (!AfxOleInit())
    {
        AfxMessageBox(IDP_OLE_INIT_FAILED);
        return FALSE;
    }

    AfxEnableControlContainer();

    // 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.
#ifndef _BCGPGANTT_STANDALONE
    SetRegistryKey(_T("BCGSoft\\BCGControlBarPro\\Examples"));
#else
    SetRegistryKey(_T("BCGSoft\\BCGGantt\\Samples"));
#endif

    LoadStdProfileSettings();  // Load standard INI file options (including MRU)

#ifndef _BCGPGANTT_STANDALONE
    SetRegistryBase (_T("Settings"));
#endif

#ifndef _BCGPGANTT_STANDALONE
    // Initialize all Managers for usage. They are automatically constructed
    // if not yet present
    InitContextMenuManager();
    InitKeyboardManager();
    InitTooltipManager();

    CBCGPToolTipParams params;
    params.m_bVislManagerTheme = TRUE;
    globalData.m_nMaxToolTipWidth = 150;

    GetTooltipManager ()->SetTooltipParams (
        0xFFFF,
        RUNTIME_CLASS (CBCGPToolTipCtrl),
        &params);

#endif

    // Register the application's document templates.  Document templates
    //  serve as the connection between documents, frame windows and views.

    CSingleDocTemplate* pDocTemplate;
    pDocTemplate = new CSingleDocTemplate(
        IDR_MAINFRAME,
        RUNTIME_CLASS(CBCGPGanttDemoDoc),
        RUNTIME_CLASS(CMainFrame),       // main SDI frame window
        RUNTIME_CLASS(CBCGPGanttDemoView));
    AddDocTemplate(pDocTemplate);

    // Parse command line for standard shell commands, DDE, file open
    CCommandLineInfo cmdInfo;
    ParseCommandLine(cmdInfo);

    // Dispatch commands specified on the command line
    if (!ProcessShellCommand(cmdInfo))
        return FALSE;

    // The one and only window has been initialized, so show and update it.
    m_pMainWnd->ShowWindow(SW_SHOW);
    m_pMainWnd->UpdateWindow();

    return TRUE;
}
开发者ID:zxlooong,项目名称:bcgexp,代码行数:69,代码来源:BCGPGanttDemo.cpp


示例15: Enable3dControls

BOOL CFontExplorerApp::InitInstance()
{
        // 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.

#if _MSC_VER < 1300                                                 // REQ #002
#ifdef _AFXDLL
        Enable3dControls();                     // Call this when using MFC in a shared DLL
#else
        Enable3dControlsStatic();       // Call this when linking to MFC statically
#endif
#endif                                                              // REQ #002
        LoadStdProfileSettings();  // Load standard INI file options (including MRU)

        // Register the application's document templates.  Document templates
        //  serve as the connection between documents, frame windows and views.

        FontExplorerTemplate = new CMultiDocTemplate(               // REQ #087
                IDR_FONTEXTYPE,
                RUNTIME_CLASS(CFontExplorerDoc),
                RUNTIME_CLASS(CChildFrame), // custom MDI child frame
                RUNTIME_CLASS(CFontExplorerView));

        KerningExplorerTemplate = new CMultiDocTemplate(            // REQ #005
           IDR_KERNINGEXPLORER,                                     // REQ #005
           RUNTIME_CLASS(CFontExplorerDoc),                         // REQ #005
           RUNTIME_CLASS(CChildFrame),                              // REQ #005
           RUNTIME_CLASS(CKerningExplorer));                        // REQ #005

        LogFontExplorerTemplate = new CMultiDocTemplate(            // REQ #053
           IDR_LOGFONTEXPLORER,                                     // REQ #053
           RUNTIME_CLASS(CFontExplorerDoc),                         // REQ #053
           RUNTIME_CLASS(CChildFrame),                              // REQ #053
           RUNTIME_CLASS(CLogFontExplorer));                        // REQ #053
        
        GetCharacterPlacementTemplate = new CMultiDocTemplate(      // REQ #005
           IDR_GETCHARACTERPLACEMENT,                               // REQ #005
           RUNTIME_CLASS(CFontExplorerDoc),                         // REQ #005
           RUNTIME_CLASS(CChildFrame),                              // REQ #005
           RUNTIME_CLASS(CGetCharacterPlacement));                  // REQ #005

        RasterExplorerTemplate = new CMultiDocTemplate(             // REQ #054
           IDR_RASTEREXPLORER,                                      // REQ #054
           RUNTIME_CLASS(CFontExplorerDoc),                         // REQ #054
           RUNTIME_CLASS(CChildFrame),                              // REQ #054
           RUNTIME_CLASS(CRaster));                                 // REQ #054

        StockFontTemplate = new CMultiDocTemplate(                  // REQ #055
           IDR_STOCKFONTEXPLORER,                                   // REQ #055
           RUNTIME_CLASS(CFontExplorerDoc),                         // REQ #055
           RUNTIME_CLASS(CChildFrame),                              // REQ #055
           RUNTIME_CLASS(CStockFont));                              // REQ #055

        FontDialogExplorerTemplate = new CMultiDocTemplate(         // REQ #078
           IDR_FONTDIALOGEXPLORER,                                  // REQ #078
           RUNTIME_CLASS(CFontExplorerDoc),                         // REQ #078
           RUNTIME_CLASS(CChildFrame),                              // REQ #078
           RUNTIME_CLASS(CFontDialogExplorer));                     // REQ #078
        
//        AddDocTemplate(pDocTemplate);                             // REQ #005

        // create main MDI Frame window
        CMainFrame* pMainFrame = new CMainFrame;
        if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
                return FALSE;
        m_pMainWnd = pMainFrame;

        // Parse command line for standard shell commands, DDE, file open
        CCommandLineInfo cmdInfo;
        ParseCommandLine(cmdInfo);

        // Dispatch commands specified on the command line
        if(cmdInfo.m_nShellCommand == CCommandLineInfo::FileNew)
           cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing; 

        if (!ProcessShellCommand(cmdInfo))
                return FALSE;

        // The main window has been initialized, so show and update it.
        pMainFrame->ShowWindow(m_nCmdShow);
        pMainFrame->UpdateWindow();

        return TRUE;
}
开发者ID:AnkurSheel,项目名称:Engine,代码行数:86,代码来源:FontExplorer.cpp


示例16: sizeof

// CRDVApp initialization
BOOL CRDVApp::InitInstance()
{
	// 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();

	if (!AfxSocketInit())
	{
		AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
		return FALSE;
	}

	// Test the O/S version information for XP or later
	if (!IsWinNT() || !IsWinVerOrHigher(5,1))
	{
		AfxMessageBox("Requires Windows XP or later");
		return FALSE;
	}

	// Initialize OLE libraries
	if (!AfxOleInit())
	{
		AfxMessageBox(IDP_OLE_INIT_FAILED);
		return FALSE;
	}
	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
	// 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("Remote Desktop System"));
	LoadStdProfileSettings(4);  // Load standard INI file options (including MRU)

	// Register the application's document templates.  Document templates
	//  serve as the connection between documents, frame windows and views
	CMultiDocTemplate* pDocTemplate;
	pDocTemplate = new CMultiDocTemplate(IDR_RDVTYPE,
		RUNTIME_CLASS(CRDVDoc),
		RUNTIME_CLASS(CChildFrame), // custom MDI child frame
		RUNTIME_CLASS(CRDVView));
	if (!pDocTemplate)
		return FALSE;
	AddDocTemplate(pDocTemplate);

	// create main MDI Frame window
	CMainFrame* pMainFrame = new CMainFrame;
	if (!pMainFrame || !pMainFrame->LoadFrame(IDR_MAINFRAME))
	{
		delete pMainFrame;
		return FALSE;
	}
	m_pMainWnd = pMainFrame;

	// call DragAcceptFiles only if there's a suffix
	//  In an MDI app, this should occur immediately after setting m_pMainWnd
	// Enable drag/drop open
	m_pMainWnd->DragAcceptFiles();

	// Enable DDE Execute open
	EnableShellOpen();
	RegisterShellFileTypes(TRUE);

	// Parse command line for standard shell commands, DDE, file open
	CCommandLineInfo cmdInfo;
	ParseCommandLine(cmdInfo);

	// Prevent an initial document from being created
	cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;

	// Dispatch commands specified on the command line.  Will return FALSE if
	// app was launched with /RegServer, /Register, /Unregserver or /Unregister.
	if (!ProcessShellCommand(cmdInfo))
		return FALSE;
	// The main window has been initialized, so show and update it
	pMainFrame->ShowWindow(m_nCmdShow);
	pMainFrame->UpdateWindow();

	return TRUE;
}
开发者ID:Chessa,项目名称:rdp,代码行数:93,代码来源:RDV.cpp


示例17: AfxEnableControlContainer


//.........这里部分代码省略.........
	//	strInfo += "\\sysInfo.ini";
	glb_strSysIniPath = glb_strSysIniPath.Left(glb_strSysIniPath.ReverseFind('\\'));
	glb_strSysIniPath += "\\sysInfo.ini";

// 	sysInfoFile = fopen(glb_strSysIniPath, "a");
// 	if( sysInfoFile == NULL )
// 	{
// 		AfxMessageBox( "The file fscanf.out was not opened\n", MB_ICONWARNING );
// 	}	
// 	fclose(sysInfoFile);

	//////////////////////////////////////////////////////////////////////////
	//读文件
	CString strFileData;
	long	nfLen = 0;
	long	nIndicator = 0;
	char	tokenBeg[] = "PARA_BEGIN";
	char	tokenEnd[] = "PARA_END";
	
	//int		nResult = 0;
	char*	data = NULL;
	
	long    firstIndicator=0;
	long    nextIndicator=0;
	CString readBackString[11];
	
	
	sysInfoFile = fopen(glb_strSysIniPath, "r");
	if (sysInfoFile)
	{
		nfLen = GetFileInfo(sysInfoFile);
		data = new char[nfLen];
		fread(data, sizeof(char), nfLen-1, sysInfoFile);
		data[nfLen-1] = '\0';
		
		strFileData = data;
		
		nIndicator = strFileData.Find(tokenBeg, nIndicator);
		if (nIndicator == -1)
		{
			AfxMessageBox("Read system information failure!");
		}
		else
		{
			nextIndicator=strFileData.Find('\n',nIndicator+1);
			for (int i=0;i<11;i++)
			{
				firstIndicator=nextIndicator;
				nextIndicator=strFileData.Find('\n',firstIndicator+1);
				readBackString[i]=
					strFileData.Mid(firstIndicator+1,nextIndicator-firstIndicator);					
			}
			
			glb_nSharpen_Time = atoi(readBackString[0]);
			glb_nSTime_Interval = atoi(readBackString[1]);
			glb_nHSpeed = atoi(readBackString[2]);		
			glb_nLSpeed = atoi(readBackString[3]);
			glb_nIdleSpeed = atoi(readBackString[4]);
			glb_nAccSpeed = atoi(readBackString[5]);		
			glb_nSwitchAngle = atoi(readBackString[6]);
			glb_nSwitchLength = atoi(readBackString[7]);
			glb_nCutDelay = atoi(readBackString[8]);
			
			glb_bPump = (BOOL)(atoi(readBackString[9]));
			glb_bDemo = (BOOL)((atoi(readBackString[10])));
		}
	}
	else
	{
		AfxMessageBox("Read system information failure!");
	}
	
	delete []data;
	data = NULL;
	
	fclose(sysInfoFile);


	if( d5480_board_init() <= 0 )//控制卡的初始化操作
		AfxMessageBox("初始化DMC5480卡失败!");

	//glb_nCount = 0;

	//Sleep(100);
	//d5480_set_pulse_outmode (Axis_X,5);
	//d5480_set_pulse_outmode (Axis_Y,5);
	//d5480_set_pulse_outmode (Axis_C,5);
	//////////////////////////////////////////////////////////////////////////


	// Dispatch commands specified on the command line
	if (!ProcessShellCommand(cmdInfo))
		return FALSE;

	// The one and only window has been initialized, so show and update it.
	m_pMainWnd->ShowWindow(SW_SHOW);
	m_pMainWnd->UpdateWindow();

	return TRUE;
}
开发者ID:TwoZz,项目名称:RoundKnife,代码行数:101,代码来源:YuanDao.cpp


示例18: string


//.........这里部分代码省略.........

  // Also in this example, there is only one menubar shared between
	//  all the views.  The automatic menu enabling support of MFC
	//  will disable the menu items that don't apply based on the
	//  currently active view.  The one MenuBar is used for all
	//  document types, including when there are no open documents.

  // enable file manager drag/drop and DDE Execute open
	pMainFrame->DragAcceptFiles();

  // Now finally show the main menu
	//pMainFrame->ShowWindow(m_nCmdShow);
	//pMainFrame->UpdateWindow();
	m_pMainWnd = pMainFrame;

  // command line arguments are ignored, create a new (empty) document
	//OnFileNew();
  // DOC //

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  TCHAR ModulePath[MAX_PATH + 1];
  ModulePath[0] = '\0';
  ::GetModuleFileName(NULL, ModulePath, sizeof(ModulePath)/sizeof(TCHAR) - 1);
  hts_rootdir(ModulePath);

  // Restore position
	((CMainFrame*)m_pMainWnd)->InitialShowWindow(nCmdShow);
	pMainFrame->UpdateWindow();

	// Dispatch commands specified on the command line
	if (!ProcessShellCommand(cmdInfo))
		return FALSE;

  // Init Winsock
  WSockInit();

	// The one and only window has been initialized, so show and update it.
	//m_pMainWnd->ShowWindow(SW_SHOW);
	//m_pMainWnd->UpdateWindow();

  /*CWinApp* app=AfxGetApp();
  POSITION pos;
  pos=app->GetFirstDocTemplatePosition();
  CDocTemplate* templ = app->GetNextDocTemplate(pos);
  pos=templ->GetFirstDocPosition();
  CDocument* doc  = templ->GetNextDoc(pos);

  CRuntimeClass* pRuntimeClass = RUNTIME_CLASS( CTest );
  CObject* pObject = pRuntimeClass->CreateObject();
  ASSERT( pObject->IsKindOf( RUNTIME_CLASS( CTest ) ) );
  
  doc->AddView((CView*) pObject);
  */

  {
    // enable file manager drag/drop and DDE Execute open
    EnableShellOpen();
    RegisterShellFileTypes();

    CWinApp* pApp = AfxGetApp();

    // register "New File" handler
    if (pApp->GetProfileInt("Interface","SetupRun",0) != 1
开发者ID:Mr-Kumar-Abhishek,项目名称:httrack-windows,代码行数:67,代码来源:WinHTTrack.cpp


示例19: sizeof

BOOL CContactAngleApp::InitInstance()
{
	// 如果一个运行在 Windows XP 上的应用程序清单指定要
	// 使用 ComCtl32.dll 版本 6 或更高版本来启用可视化方式,
	//则需要 InitCommonControlsEx()。否则,将无法创建窗口。
	INITCOMMONCONTROLSEX InitCtrls;
	InitCtrls.dwSize = sizeof(InitCtrls);
	// 将它设置为包括所有要在应用程序中使用的
	// 公共控件类。
	InitCtrls.dwICC = ICC_WIN95_CLASSES;
	InitCommonControlsEx(&InitCtrls);

	CWinApp::InitInstance();

	// 初始化 OLE 库
	if (!AfxOleInit())
	{
		AfxMessageBox(IDP_OLE_INIT_FAILED);
		return FALSE;
	}
	AfxEnableControlContainer();
	// 标准初始化
	// 如果未使用这些功能并希望减小
	// 最终可执行文件的大小,则应移除下列
	// 不需要的特定初始化例程
	// 更改用于存储设置的注册表项
	// TODO: 应适当修改该字符串,
	// 例如修改为公司或组织名
	SetRegistryKey(_T("应用程序向导生成的本地应用程序"));
	LoadStdProfileSettings(4);  // 加载标准 INI 文件选项(包括 MRU)
	// 注册应用程序的文档模板。文档模板
	// 将用作文档、框架窗口和视图之间的连接
	CSingleDocTemplate* pDocTemplate;
	pDocTemplate = new CSingleDocTemplate(
		IDR_MAINFRAME,
		RUNTIME_CLASS(CContactAngleDoc),
		RUNTIME_CLASS(CMainFrame),       // 主 SDI 框架窗口
		RUNTIME_CLASS(CContactAngleView));
	if (!pDocTemplate)
		return FALSE;
	AddDocTemplate(pDocTemplate);



	// 分析标准外壳命令、DDE、打开文件操作的命令行
	CCommandLineInfo cmdInfo;
	ParseCommandLine(cmdInfo);


	// 调度在命令行中指定的命令。如果
	// 用 /RegServer、/Register、/Unregserver 或 /Unregister 启动应用程序,则返回 FALSE。
	if (!ProcessShellCommand(cmdInfo))
		return FALSE;

	// 唯一的一个窗口已初始化,因此显示它并对其进行更新
	m_pMainWnd->ShowWindow(SW_SHOW);
	m_pMainWnd->UpdateWindow();
	// 仅当具有后缀时才调用 DragAcceptFiles
	//  在 SDI 应用程序中,这应在 ProcessShellCommand 之后发生
	return TRUE;
}
开发者ID:mw5945,项目名称:CAMS,代码行数:61,代码来源:ContactAngle.cpp


示例20: sizeof


//.........这里部分代码省略.........
	AfxEnableControlContainer();

	EnableTaskbarInteraction();

	// 使用 RichEdit 控件需要  AfxInitRichEdit2()	
	// AfxInitRichEdit2();

	// 标准初始化
	// 如果未使用这些功能并希望减小
	// 最终可执行文件的大小,则应移除下列
	// 不需要的特定初始化例程
	// 更改用于存储设置的注册表项
	// TODO:  应适当修改该字符串,
	// 例如修改为公司或组织名
	SetRegistryKey(_T("应用程序向导生成的本地应用程序"));
	LoadStdProfileSettings(16);  // 加载标准 INI 文件选项(包括 MRU)

	// GDI+
	GdiplusStartupInput gdiplusStartupInput;
	GdiplusStartup(&m_gdiplusToken, &gdiplusStartupInput, NULL);

	InitContextMenuManager();

	InitKeyboardManager();

	InitTooltipManager();
	CMFCToolTipInfo ttParams;
	ttParams.m_bVislManagerTheme = TRUE;
	theApp.GetTooltipManager()->SetTooltipParams(AFX_TOOLTIP_TYPE_ALL,
		RUNTIME_CLASS(CMFCToolTipCtrl), &ttParams);

	// 注册应用程序的文档模板。  文档模板
	// 将用作文档、框架窗口和视图之间的连接
	CMultiDocTemplate* pDocTemplate;
	pDocTemplate = new CMultiDocTemplate(IDR_XiYuanTYPE,
		RUNTIME_CLASS(CXiYuanDoc),
		RUNTIME_CLASS(CChildFrame), // 自定义 MDI 子框架
		RUNTIME_CLASS(CXiYuanView));
	if (!pDocTemplate)
		return FALSE;
	AddDocTemplate(pDocTemplate);
	// 将 COleTemplateServer 连接到文档模板
	// COleTemplateServer 通过使用
	// 文档模板中指定的信息来为请求 OLE 容器
	// 创建新文档
	m_server.ConnectTemplate(clsid, pDocTemplate, FALSE);
	// 将所有的 OLE 服务器工厂注册为正在运行。  这将启用
	//  OLE 库以从其他应用程序中创建对象
	COleTemplateServer::RegisterAll();
		// 注意:  MDI 应用程序将注册所有的服务器对象,而不管
		// 命令行上的 /Embedding 或 /Automation

	// 创建主 MDI 框架窗口
	CMainFrame* pMainFrame = new CMainFrame;
	if (!pMainFrame || !pMainFrame->LoadFrame(IDR_MAINFRAME))
	{
		delete pMainFrame;
		return FALSE;
	}
	m_pMainWnd = pMainFrame;


	// 分析标准 shell 命令、DDE、打开文件操作的命令行
	CCommandLineInfo cmdInfo;
	ParseCommandLine(cmdInfo);


	// 应用程序是用 /Embedding 或 /Automation 开关启动的。
	//使应用程序作为自动化服务器运行。
	if (cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated)
	{
		// 不显示主窗口
		return TRUE;
	}
	// 使用 /Unregserver 或 /Unregister 开关启动应 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ Process_Set_Text函数代码示例发布时间:2022-05-30
下一篇:
C++ ProcessQueryCallbacks函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap