本文整理汇总了C++中Tools::showCmdHelp方法的典型用法代码示例。如果您正苦于以下问题:C++ Tools::showCmdHelp方法的具体用法?C++ Tools::showCmdHelp怎么用?C++ Tools::showCmdHelp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tools
的用法示例。
在下文中一共展示了Tools::showCmdHelp方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WinMain
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR pCmdLine, int nCmdShow)
{
char c;
bool bStopTest = false;
iError = ERROR_SUCCESS;
int _iError = ERROR_SUCCESS;
int iCount = 0;
if (0 == strcmp(pCmdLine, "") )
_iError = createGUI(hInstance, nCmdShow);
else
{
svParameters = tools.parseCmdLine(pCmdLine);
_iError = parseCmdParameters();
if (_iError == ERROR_SUCCESS)
{
if (!AllocConsole())
MessageBoxA(NULL, "console allocation error", WINDOW_TITLE, MB_OK | MB_ICONERROR);
cout << "starting the thread" << endl;
thread t1 (&start);
t1.detach();
cout << "Test in progress" << endl;
cout << "Press ESC to stop the test" << endl;
while(bContinue && !bStopTest)
{
c = getch();
//27 for esc key
if (c == 27)
{
interpreter.stopTest();
cout << "Quiting test" << endl;
bStopTest = true;
cout << "Testing stopped. Press enter to finish" << endl;
//getchar();
}
iCount++;
}
cout << "Testing finished" << endl;
FreeConsole();
return iError;
}
else
{//error parsing parameters
tools.showCmdHelp();
return _iError;
}
}
return _iError;
}