当前位置: 首页>>代码示例>>C++>>正文


C++ ShowHelp函数代码示例

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


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

示例1: ProcessCommandLine

void ProcessCommandLine(int argc, char* argv[])
{
	// Remove the first argument: the current application name...
	--argc; ++argv;
	while (argc > 0)
	{
		if (argv[0][0] == '-' || argv[0][0] == '/')
		{
			++(argv[0]);
			if (strcmp(argv[0], "-v") && argc >= 2)
			{
				isVerbose = FUStringConversion::ToBoolean(argv[1]);
				argc -= 2; argv += 2;
			}
			else
			{
				// unknown flag
				ShowHelp(); break;
			}
		}
		else if (argc == 1)
		{
			logFilename = TO_FSTRING((const char*) *(argv++));
			--argc;
		}
		else
		{
			ShowHelp(); break;
		}
	}
}
开发者ID:Marlinc,项目名称:0ad,代码行数:31,代码来源:FCTest.cpp

示例2: TabCtrl_GetCurSel

void 
ConnectionCommunity::OnWmConnectionHelp(HWND hwnd)
{
	int tab = TabCtrl_GetCurSel(GetDlgItem(hwnd, IDC_CONNTAB));

	switch(tab)
	{
	case 0:
		ShowHelp("http://sqlyogkb.webyog.com/article/151-getting-started");
		break;
	case 1:
		ShowHelp("http://sqlyogkb.webyog.com/article/155-connecting-using-http-tunneling");
		break;
	case 2:	
		ShowHelp("http://sqlyogkb.webyog.com/article/154-connecting-using-ssh-tunneling");
		break;
	case 3:
		ShowHelp("http://sqlyogkb.webyog.com/article/157-connecting-using-ssl-encryption");
		break;
	case 4:
		ShowHelp("http://sqlyogkb.webyog.com/article/252-advanced-tab");
		break;
	}
    return;
}
开发者ID:ArsalanYaqoob,项目名称:sqlyog-community,代码行数:25,代码来源:ConnectionCommunity.cpp

示例3: HelpContents

BOOL HelpContents()
{
#ifndef STANDALONE

	// If F1 was pressed, popup help in the context of the current tool. Use the tool's OpToken (of 
	// the form "TOOL<ToolId>") to look-up its help page. Fixes #10489
	if (KeyPress::IsKeyPressed(CAMKEY(F1)))
	{
		String OpToken;
		OpToken._MakeMsg( _T("TOOL%u"), Tool::GetCurrentID() );
		DWORD dwHelpIndex = LookupOperationTopic(OpToken);
		return ShowHelp(HELP_CONTEXT, dwHelpIndex);
	}

	return ShowHelp(HELP_FINDER, 0);

#else // STANDALONE
	// On the viewer go directly to the contents page on all OS's
	#ifdef WEBSTER
		return ShowHelp(HELP_CONTEXT, _R(IDH_Contents));
	#else //WEBSTER
		return ShowHelp(HELP_CONTEXT, _R(IDH_Misc_Contents));
	#endif // WEBSTER
#endif // STANDALONE
}
开发者ID:UIKit0,项目名称:xara-xtreme,代码行数:25,代码来源:helpuser.cpp

示例4: ShowHelp

    int Application::Run()
    {
        auto& options = pimpl_->options;

        if (options.showHelp)
        {
            ShowHelp();
            return 0;
        }

        if (options.filename.empty())
        {
            internal::PrintInputError("no input file");
            ShowHelp();
            return 0;
        }

        blueprint::Parser parser;
        parser.SetListTypes(options.listTypes);
        parser.SetVerbose(options.verbose);
        parser.SetOutputDirectory(options.outputDir);
        parser.ParseWorkspace(options.filename);

        return 0;
    }
开发者ID:eparayre,项目名称:blueprint,代码行数:25,代码来源:Application.cpp

示例5: desc

 void CCCountCLI::SetUp(int argc, char** argv)
 {
     po::options_description desc("USAGE: cjkcount [OPTION]+ [FILE]+\n\n"  
                                   "print the counts of total and distinguishable "
                                   "Chinese characters\nappeared in given file(s)\n\n"
                                   "If no file is provided, it reads text from stdin.\n\n" 
                                   "OPTIONS:\n");
     po::positional_options_description p;
     p.add("inputfile", -1);
     
     desc.add_options()
       ("help,h","show this message and exit")
       ("nosummary,S", "do not show the summary (default output) ")
       ("listall,l", "list all distinguishable Chinese characters appeared, with corresponding counting, "
         "sorted by the counts descendantly.")
       ("inputfile,f",po::value< vector<string> >(&_files),"input files");
     try
     {  
       po::store(po::command_line_parser(argc,argv).options(desc)
         .style(po::command_line_style::unix_style|
           po::command_line_style::allow_sticky|po::command_line_style::allow_guessing)
         .positional(p).run(),_ops);
       po::notify(_ops);      
       
     }
     catch(exception& e)
     {
       cout << e.what()<<endl;
       ShowHelp(desc,false);
     }
     if(_ops.count("help"))
       ShowHelp(desc);
 }
开发者ID:blankego,项目名称:cccount,代码行数:33,代码来源:cccountcli.cpp

示例6: main

int main(int argc, char **argv) {
  android::base::InitLogging(argv);

  const std::string cmd_line = GetCommandLine(argc, argv);
  LOG(INFO) << "Service started: " << cmd_line;

  int opt = 0;
  while ((opt = getopt(argc, argv, "hlpr:")) != -1) {
    switch (opt) {
      case 'h': {
        ShowHelp(argv[0]);
        break;
      }

      case 'l': {
        LogBootEvents();
        break;
      }

      case 'p': {
        PrintBootEvents();
        break;
      }

      case 'r': {
        // |optarg| is an external variable set by getopt representing
        // the option argument.
        const char* event = optarg;

        BootEventRecordStore boot_event_store;
        boot_event_store.AddBootEvent(event);
        break;
      }

      default: {
        DCHECK_EQ(opt, '?');

        // |optopt| is an external variable set by getopt representing
        // the value of the invalid option.
        LOG(ERROR) << "Invalid option: " << optopt;
        ShowHelp(argv[0]);
        return EXIT_FAILURE;
      }
    }
  }

  return 0;
}
开发者ID:iamduyu,项目名称:platform_system_core,代码行数:48,代码来源:bootstat.cpp

示例7: switch

INT_PTR CALLBACK
CImportError::WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
	CImportError	*warn = (CImportError*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
		
	wyString		warnstr;
	
	switch(message)
	{
	case WM_INITDIALOG:
		SetWindowLongPtr(hwnd, GWLP_USERDATA, lParam);
        LocalizeWindow(hwnd);
		PostMessage(hwnd, WM_INITDLGVALUES, 0, 0);
		return wyTrue;

	case WM_INITDLGVALUES:
		{
			warnstr.SetAs(warn->m_message);
			SetWindowText(GetDlgItem(hwnd, IDC_MESSAGE), warnstr.GetAsWideChar());	
			HICON icon = LoadIcon(NULL, IDI_INFORMATION);
            VERIFY(icon);
			SendMessage(GetDlgItem(hwnd, IDC_STATICIMG), STM_SETIMAGE, IMAGE_ICON, (LPARAM)(UINT)icon);
		}
		break;

	case WM_HELP:
		ShowHelp("http://sqlyogkb.webyog.com/article/235-excute-sql-script");
		return wyTrue;

	case WM_COMMAND:
		warn->OnWMCommand(hwnd, wParam);
		break;
	}
	return wyFalse;
}
开发者ID:ArsalanYaqoob,项目名称:sqlyog-community,代码行数:35,代码来源:ImportBatch.cpp

示例8: main

int main(int argc, char** argv)
{
	std::map<std::string, std::string> args = ProcessArgs(argc, argv);

	if (args.size() != 5 || !ValidateArgs(args))
	{
		ShowHelp();
		return -5;
	}

	DesuraId id(args["-i"].c_str(), args["-t"].c_str());

	if (!Login(args["-u"], args["-p"]))
		return -1;

	if (!CreateMcf(id, args["-f"]))
		return -2;

	if (!StartUpload(id))
		return -3;

	if (!UploadMcf())
		return -4;

	return 0;
}
开发者ID:Alasaad,项目名称:Desurium,代码行数:26,代码来源:main.cpp

示例9: OnEclHelp

 void OnEclHelp(UINT /*uNotifyCode*/, int /*nID*/, HWND /*hWnd*/)
 {
     CString message;
     m_dlgview.GetWordAtCurPosNoPeriodPlusHash(message);
     if (message[0])
         ShowHelp((const TCHAR *)message);
 }
开发者ID:dehilsterlexis,项目名称:eclide,代码行数:7,代码来源:ChildAttributeFrame.cpp

示例10: _tmain

int _tmain (int argc, _TCHAR **argv)
{

	if (argc < 2)
	{
		ShowHelp ();
		return (-1);
	}

	std::string	LicStorageImage;

	if (!ReadFile (argv[1], &LicStorageImage))
	{
		_tprintf (_T ("\nFailed to load file %s\n"), argv[1]);
		return (-1);
	}

	if (!DumpLicStorage (LicStorageImage))
	{
		return (-1);
	}

	return (0);

}
开发者ID:hackshields,项目名称:antivirus,代码行数:25,代码来源:main.cpp

示例11: DeInitUserHelp

BOOL DeInitUserHelp()
{
PORTNOTETRACE("help", "Help function unimplemented!");
#if !defined(EXCLUDE_FROM_XARALX)
	// Tell the help engine we've finished using the help file(s).
	// NB. KNWON BUG: this doesn't do the job on Windows NT, leaving the helpfiles open.
	// As yet I have no idea why - it is as per the docs and works on Win32s & Chicago.
	if (fHaveUsedHelp)
	{
		TRACEUSER( "Ollie", _T("Closing general helpfile\n"));
		ShowHelp(HELP_QUIT, 0);
	}

#ifdef STANDALONE
	// Same if we ran the special helpfile.
	if (fHaveUsedSpecHelp)
	{
		TRACEUSER( "Ollie", _T("Closing special helpfile\n"));
		RunOilHelp(achzSpecPath, HELP_QUIT, 0);
	}
#endif

	// Remove our F1 message hook.
	return hF1Hook == NULL || ::UnhookWindowsHookEx(hF1Hook);
#else
	return TRUE;
#endif
}
开发者ID:UIKit0,项目名称:xara-xtreme,代码行数:28,代码来源:helpuser.cpp

示例12: HelpUserTopic

BOOL HelpUserTopic(DWORD dwHelpIndex)
{
	if (dwHelpIndex == 0)
		return FALSE;
	
	// Show this topic in the help system and return a success code.
	return ShowHelp(HELP_CONTEXT, dwHelpIndex);
}
开发者ID:UIKit0,项目名称:xara-xtreme,代码行数:8,代码来源:helpuser.cpp

示例13: ShowHelp

BOOL CDLUpdateDlg::OnHelpInfo(HELPINFO* pHelpInfo) 
{
	// TODO: Add your message handler code here and/or call default
    if (pHelpInfo->iContextType == HELPINFO_WINDOW){
        return ShowHelp(GetSafeHwnd(),pHelpInfo->dwContextId);
    }
    return TRUE;
}
开发者ID:LM25TTD,项目名称:ATCMcontrol_Engineering,代码行数:8,代码来源:DLUpdateDlg.cpp

示例14: HelpTechnicalSupport

BOOL HelpTechnicalSupport()
{
#ifdef WEBSTER
	return FALSE;
#else
	return ShowHelp(HELP_CONTEXT, _R(IDH_Misc_Tech_Support));
#endif
}
开发者ID:UIKit0,项目名称:xara-xtreme,代码行数:8,代码来源:helpuser.cpp

示例15: switch

// Function to subclass the messageedit box. It is not used now but it is reserved for later
// use.
LRESULT	CALLBACK 
TabMessage::WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
{
	TabMessage* pcquerymessageedit = (TabMessage*)GetWindowLongPtr(hwnd, GWLP_USERDATA);

	switch(message)
	{
    case WM_COMMAND:
        pcquerymessageedit->OnWMCommand(wparam);
        break;

    case UM_FOCUS:
	    SetFocus(pcquerymessageedit->m_hwnd);
		break;

     case WM_HELP:
		ShowHelp("Messages%20Tab%20for%20SQLyog%20MySQL%20Management%20Tool.htm");
		return 1;

     case SCI_COPY:
     case WM_KEYDOWN:
        if(wparam == VK_INSERT || wparam == 'c' || wparam == 'C')
        {
            pcquerymessageedit->CopyTextToClipBoard();
            return 1;
        }
	    break;

	case WM_SETFOCUS:
	case WM_KEYUP:
	case WM_LBUTTONUP:
        PostMessage(pcquerymessageedit->m_pmdi->m_pctabmodule->m_hwnd, UM_SETSTATUSLINECOL, (WPARAM)hwnd, 1);
		break;
        
    case WM_KILLFOCUS:
        PostMessage(pcquerymessageedit->m_pmdi->m_pctabmodule->m_hwnd, UM_SETSTATUSLINECOL, (WPARAM)NULL, 0);
        break;

    case WM_DESTROY:
	    if(pcquerymessageedit->m_hfont)
        {
		    DeleteObject(pcquerymessageedit->m_hfont);
        }

	    pcquerymessageedit->m_hfont = NULL;
	    break;

    /*case WM_CONTEXTMENU:
        if(pcquerymessageedit->OnContextMenu(lparam) == wyTrue)
        {
            return 0;
        }

        break;*/
    }

    return CallWindowProc(pcquerymessageedit->m_wporigproc, hwnd, message, wparam, lparam);
}
开发者ID:Fale,项目名称:sqlyog,代码行数:60,代码来源:TabMessage.cpp


注:本文中的ShowHelp函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。