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


C++ DisplayHelp函数代码示例

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


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

示例1: GetHelpPage

void DialogWithHelp::OnHelp(wxCommandEvent &ev)
{
	wxString page = GetHelpPage();

	if (!page.IsEmpty())
	{
		if (page.StartsWith(wxT("pg/")))
			DisplayHelp(page.Mid(3), HELP_POSTGRESQL);
		else if (page.StartsWith(wxT("slony/")))
			DisplayHelp(page.Mid(6), HELP_SLONY);
		else
			DisplayHelp(page, HELP_PGADMIN);
	}
}
开发者ID:kleopatra999,项目名称:pgadmin3,代码行数:14,代码来源:dlgClasses.cpp

示例2: ParseCommandLine

bool ParseCommandLine(int argc, LPTSTR argv[])
{
	for (int i=1; i<argc; i++)
	{
		LPCTSTR szOption = argv[i];
		if (szOption[0] == '-' || szOption[0] == '/')
		{
			szOption++;
			if (strcmp(szOption, "?") == 0)
				return DisplayHelp();
			else if (_stricmp(szOption, "at") == 0)
			{
				if (g_eat != ExamineAccessTokenDefault)
					return DisplayHelp();
				g_eat = ExamineAccessTokenYes;
			}
			else if (_stricmp(szOption, "no_at") == 0)
			{
				if (g_eat != ExamineAccessTokenDefault)
					return DisplayHelp();
				g_eat = ExamineAccessTokenNo;
			}
			else if (_stricmp(szOption, "file") == 0)
			{
				if (g_eot != ExamineObjectTypeDefault)
					return DisplayHelp();
				g_eot = ExamineObjectTypeFile;
			}
			else if (_stricmp(szOption, "regkey") == 0)
			{
				if (g_eot != ExamineObjectTypeDefault)
					return DisplayHelp();
				g_eot = ExamineObjectTypeRegkey;
			}
			else if (_stricmp(szOption, "service") == 0)
			{
				if (g_eot != ExamineObjectTypeDefault)
					return DisplayHelp();
				g_eot = ExamineObjectTypeService;
			}
			else if (_stricmp(szOption, "kernel") == 0)
			{
				if (g_eot != ExamineObjectTypeDefault)
					return DisplayHelp();
				g_eot = ExamineObjectTypeKernel;
			}
			else if (_stricmp(szOption, "printer") == 0)
			{
				if (g_eot != ExamineObjectTypeDefault)
					return DisplayHelp();
				g_eot = ExamineObjectTypePrinter;
			}
		}
		else
			g_aObjects.Add(szOption);
	}

	return true;
}
开发者ID:Jinjiego,项目名称:VCSamples,代码行数:59,代码来源:ATLSecurity.cpp

示例3: main

int main(int argc, char** argv) {
    struct global_data_t globals;

    if (argc < 2 || 
        (std::string(argv[1]) != "count" && std::string(argv[1]) != "build") ) {
        DisplayHelp(argv[0]);
        exit(1);
    }

    if (std::string(argv[1]) == "count") {
        ParsePhase1Option(argc - 1, argv + 1);

        globals.kmer_k = phase1_options.kmer_k;
        globals.kmer_freq_threshold = phase1_options.min_edge_freq;
        globals.max_read_length = phase1_options.max_read_length;
        globals.host_mem = phase1_options.host_mem;
        globals.gpu_mem = phase1_options.gpu_mem;
        globals.num_cpu_threads = phase1_options.num_cpu_threads;
        globals.phase1_num_output_threads = phase1_options.num_output_threads;
        globals.input_file = phase1_options.input_file.c_str();
        globals.output_prefix = phase1_options.output_prefix.c_str();

        log ("Host memory to be used: %ld\n", globals.host_mem);
        log ("Number CPU threads: %d\n", globals.num_cpu_threads);

#ifndef DISABLE_GPU
        log ("GPU memory to be used: %ld\n",  globals.gpu_mem);
        if (globals.gpu_mem < 2147483648LL) {
            err("Warning, maybe not enough GPU memory. At least 2G is recommended. Process will be continue though.\n");
        }
#endif

        phase1::Phase1Entry(globals);
    } else if (std::string(argv[1]) == "build") {
        ParsePhase2Option(argc - 1, argv + 1);

        globals.need_mercy = phase2_options.need_mercy;
        globals.host_mem = phase2_options.host_mem;
        globals.gpu_mem = phase2_options.gpu_mem;
        globals.num_cpu_threads = phase2_options.num_cpu_threads;
        globals.phase1_num_output_threads = phase2_options.num_edge_files;
        globals.phase2_num_output_threads = phase2_options.num_output_threads;
        globals.phase2_input_prefix = phase2_options.input_prefix.c_str();
        globals.output_prefix = phase2_options.output_prefix.c_str();
        globals.max_read_length = phase2_options.max_read_length;

        log ("Host memory to be used: %ld\n", globals.host_mem);
        log ("Number CPU threads: %d\n", globals.num_cpu_threads);

#ifndef DISABLE_GPU
        log ("GPU memory to be used: %ld\n",  globals.gpu_mem);
        if (globals.gpu_mem < 2147483648LL) {
            err("Warning, maybe not enough GPU memory. At least 2G is recommended. Process will be continue though.\n");
        }
#endif
        phase2::Phase2Entry(globals);
    }

    return 0;
}
开发者ID:ch11y,项目名称:megahit,代码行数:60,代码来源:sdbg_builder.cpp

示例4: switch

/*--------------------------------------------------------------------------*/
SIGNED HelpMenuClass::Message(const PegMessage &Mesg)
{
		MainMenuClass *pMainWindow;

    switch (Mesg.wType)
    {
		
		case PM_KEYLEFT:
		case PM_KEYRIGHT:
				switch(Mesg.iData)
				{
					case HelpSelectionButtonID:
						if (Mesg.wType == PM_KEYRIGHT)
						{
						}
						else
						{
						}
						DisplayHelp(); /* setup help window */
						break;
				}
				break;

		case PM_CLOSE:
			  /* left key = close = go back to previous menu */
				Destroy(this);
				pMainWindow = (MainMenuClass*) Presentation()->Find(MAIN_MENU_ID);
				pMainWindow->SetBitmap(&gbMainBitmap);
				break;

    default:
        return PegWindow::Message(Mesg);
    }
    return 0;
}
开发者ID:garyqinyu,项目名称:abv,代码行数:36,代码来源:help.cpp

示例5: Close

void MenuInstanceData::Menus(const string& menuDirectory, const string& menuName) {
  path = menuDirectory;
  menu = menuName;

  if (Open()) {
    if (header.nNumbers == MENU_NUMFLAG_DIRNUMBER && udir[0].subnum == -1) {
      bout << "\r\nYou cannot currently access the file section.\r\n\n";
      Close();
      return;
    }
    // if flagged to display help on entrance, then do so
    if (session()->user()->IsExpert() && header.nForceHelp == MENU_HELP_ONENTRANCE) {
      DisplayHelp();
    }

    while (!hangup && !finished) {
      PrintMenuPrompt(this);
      const string command = GetCommand(this);
      MenuExecuteCommand(this, command);
    }
  } else if (IsEqualsIgnoreCase(menuName.c_str(), "main")) {     // default menu name
    hangup = true;
  }
  Close();
}
开发者ID:insidenothing,项目名称:wwiv,代码行数:25,代码来源:menu.cpp

示例6: AsciitabProc

static int AsciitabProc(WINDOW wnd,MESSAGE msg, PARAM p1,PARAM p2)
{
    switch (msg)    {
        case CREATE_WINDOW:
            DefaultWndProc(wnd, msg, p1, p2);
            CreateWindowMsg(wnd);
            return TRUE;
        case KEYBOARD:
            if (KeyboardMsg(wnd, p1))
                return TRUE;
            break;
        case PAINT:
            DefaultWndProc(wnd, msg, p1, p2);
            DisplayAsciitab(wnd);
            return TRUE;
        case COMMAND:
            if ((int)p1 == ID_HELP)    {
                DisplayHelp(wnd, "ASCII Table");
                return TRUE;
            }
            break;
        case CLOSE_WINDOW:
            ATwnd = NULL;
            break;
        default:
            break;
    }
    return DefaultWndProc(wnd, msg, p1, p2);
}
开发者ID:CivilPol,项目名称:sdcboot,代码行数:29,代码来源:asciitab.c

示例7: DisplayHelp

void cOsdMenu::SetHelp(const char *Red, const char *Green, const char *Yellow, const char *Blue)
{
    // strings are NOT copied - must be constants!!!
    helpRed    = Red;
    helpGreen  = Green;
    helpYellow = Yellow;
    helpBlue   = Blue;
    DisplayHelp(true);
}
开发者ID:popazerty,项目名称:evolux-spark-sh4,代码行数:9,代码来源:osdbase.c

示例8: DisplayHelp

bool wxExtHelpController::DisplaySection(const wxString& section)
{
    bool isFilename = (section.Find(wxT(".htm")) != -1);

    if (isFilename)
        return DisplayHelp(section);
    else
        return KeywordSearch(section);
}
开发者ID:EdgarTx,项目名称:wx,代码行数:9,代码来源:helpext.cpp

示例9: ParseOptions

bool ParseOptions(int argc, char** argv, std::string& configPath, 
                  bool& siteop, bool& raw, std::string& templatePath)
{
  po::options_description visible("supported options");
  visible.add_options()
    ("help,h", "display this help message")
    ("version,v", "display version")
    ("config-path,c", po::value<std::string>(&configPath), "specify location of config file")
    ("siteop,s", "site who")
    ("raw,r", "raw formatting")
    ("template,y", po::value<std::string>(&templatePath), "template file path")
  ;
  
  po::variables_map vm;
  try
  {
    po::store(po::command_line_parser(argc, argv).options(visible).run(), vm);

    if (vm.count("help"))
    {
      DisplayHelp(argv[0], visible);
      return false;
    }

    if (vm.count("version"))
    {
      DisplayVersion();
      return false;
    }

    po::notify(vm);
  }
  catch (const po::error& e)
  {
    std::cerr << e.what() << std::endl;
    DisplayHelp(argv[0], visible);
    return false;
  }
  
  siteop = vm.count("siteop") > 0;
  raw = vm.count("raw") > 0;
  
  return true;
}
开发者ID:glftpd,项目名称:ebftpd,代码行数:44,代码来源:who.cpp

示例10: DisplayHelp

void cOsdMenu::Display(void)
{
  if (subMenu) {
     subMenu->Display();
     return;
     }
  displayMenu->SetMessage(mtStatus, NULL);
  displayMenu->Clear();
  cStatus::MsgOsdClear();
  if (menuCategory != displayMenu->MenuCategory())
     displayMenu->SetMenuCategory(menuCategory);
  displayMenuItems = displayMenu->MaxItems();
  cStatus::MsgOsdMenuDisplay(MenuKind());
#ifdef REELVDR
  /* EnableSideNote here, before SetTitle() since
     SetTitle draws the SideNote-background */
  displayMenu->EnableSideNote(enableSideNote);
#endif
  displayMenu->SetTabs(cols[0], cols[1], cols[2], cols[3], cols[4]);//XXX
  displayMenu->SetTitle(title);
  cStatus::MsgOsdTitle(title);
  DisplayHelp(true);
  int count = Count();
  if (count > 0) {
     int ni = 0;
     for (cOsdItem *item = First(); item; item = Next(item)) {
         cStatus::MsgOsdItem(item->Text(), ni++);
         if (current < 0 && item->Selectable())
            current = item->Index();
         }
     if (current < 0)
        current = 0; // just for safety - there HAS to be a current item!
     first = min(first, max(0, count - displayMenuItems)); // in case the menu size has changed
     if (current - first >= displayMenuItems || current < first) {
        first = current - displayMenuItems / 2;
        if (first + displayMenuItems > count)
           first = count - displayMenuItems;
        if (first < 0)
           first = 0;
        }
     int i = first;
     int n = 0;
     for (cOsdItem *item = Get(first); item; item = Next(item)) {
         bool CurrentSelectable = (i == current) && item->Selectable();
         item->SetMenuItem(displayMenu, i - first, CurrentSelectable, item->Selectable());
         if (CurrentSelectable)
            cStatus::MsgOsdCurrentItem(item->Text());
         if (++n == displayMenuItems)
            break;
         i++;
         }
     }
  displayMenu->SetScrollbar(count, first);
  if (!isempty(status))
     displayMenu->SetMessage(mtStatus, status);
}
开发者ID:suborb,项目名称:reelvdr,代码行数:56,代码来源:osdbase.c

示例11: Listbox_OnKeyDown

// Main window KeyDown event handler
VOID Listbox_OnKeyDown(WPARAM wParam, LPARAM lParam)
{
    switch(wParam)
    {
    case VK_ESCAPE:
        SendMessage(hMainWin, WM_DESTROY, 0, 0);
        break;
    case VK_F5:
        Refresh();
        break;
    case VK_F1:
        DisplayHelp();
        break;
    }
}
开发者ID:eviltester,项目名称:forceWindowVisible,代码行数:16,代码来源:forceWindowVisible.cpp

示例12: Get

void cOsdMenu::DisplayCurrent(bool Current)
{
  cOsdItem *item = Get(current);
  if (item) {
     displayMenu->SetItem(item->Text(), current - first, Current && item->Selectable(), item->Selectable());
     if (Current && item->Selectable())
        cStatus::MsgOsdCurrentItem(item->Text());
     if (!Current)
        item->SetFresh(true); // leaving the current item resets 'fresh'
     if (cMenuEditItem *MenuEditItem = dynamic_cast<cMenuEditItem *>(item)) {
        if (!MenuEditItem->DisplayHelp())
           DisplayHelp();
        else
           helpDisplayed = false;
        }
     }
}
开发者ID:suborb,项目名称:reelvdr,代码行数:17,代码来源:osdbase.c

示例13: m_displayHelp

PatcherOptions::PatcherOptions(int argc, char* argv[]) : m_displayHelp(false), m_displayVersion(false),
	m_interactive(true), m_patchToRealLength(false), m_timeInSeconds(105),
	m_lengthConditionType(condition_none), m_lengthCondition(120), m_startingPaths()
{
	po::options_description desc = GetCmdOptions();

	po::positional_options_description positionalOptions;
	positionalOptions.add("patchpaths", -1);

	po::variables_map vm;
	po::store(po::command_line_parser(argc, argv).options(desc).positional(positionalOptions).run(), vm);
	po::notify(vm);

	DisplayHelp(vm.count("help") > 0);
	DisplayVersion(vm.count("version") > 0);
	Interactive(vm.count("not-interactive") == 0);

	bool unpatch = vm.count("unpatch") > 0;
	bool patchall = vm.count("patchall") > 0;

	if(vm.count("patchpaths"))
	{
		SetStartingPaths(vm["patchpaths"].as<vector<string> >());
	}
	else
	{
		StartingPaths().push_back(fs::initial_path().string());
	}

	if(!unpatch)
	{
		TimeInSeconds(105);
		UseLengthGreaterThanCondition(120);
	}
	else
	{
		PatchToRealLength();
		UseLengthEqualCondition(105);
	}

	if(patchall)
	{
		DontUseLengthCondition();
	}
}
开发者ID:LHCGreg,项目名称:itgoggpatch,代码行数:45,代码来源:PatcherOptions.cpp

示例14: switch

LRESULT CAppWindow::OnCommand(WORD wID)
{
	switch (wID)
	{
	case ID_TRAYICON_EXIT:
		SendMessage(WM_SYSCOMMAND, SC_CLOSE);
		break;

	case ID_TRAYICON_CHECKFORUPDATESNOW:
		m_fManualUpdateCheck = TRUE;

		CheckForUpdates();
		break;

	case ID_TRAYICON_INBOX:
		OpenInbox();
		break;

	case ID_TRAYICON_LOGIN:
		PromptForCredentials();
		break;

	case ID_TRAYICON_SIGNOUT:
		SignOut(TRUE);
		break;

	case ID_TRAYICON_HELP:
		DisplayHelp();
		break;

	case ID_TRAYICON_ABOUT:
		(new CAboutDialog())->Create(DT_ABOUT, this);
		break;

	case ID_TRAYICON_OPTIONS:
		(new COptionsSheet())->Create(DT_OPTIONS, this);
		break;

	case ID_TRAYICON_CHECKWAVESNOW:
		CheckWavesNow();
		break;
	}

	return 0;
}
开发者ID:pvginkel,项目名称:wave-notify,代码行数:45,代码来源:CAppWindow.cpp

示例15: ProcessCommandLine

void ProcessCommandLine (int argc, char* argv[])
{

  if ( argc <= 1 )
  {
    DisplayHelp();
    exit (0);
  }
  else
  {
    _tInputFileName   = argv [1];
    _tInputFileFormat = FileExtension (_tInputFileName);

    cout << "File : " << _tInputFileName << endl;
    cout << "Type : " << _tInputFileFormat << endl;
  }

}  /* ProcessCommandLine() */
开发者ID:bartholomule,项目名称:panorama,代码行数:18,代码来源:render.cpp


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