本文整理汇总了C++中CsvReader::randSort方法的典型用法代码示例。如果您正苦于以下问题:C++ CsvReader::randSort方法的具体用法?C++ CsvReader::randSort怎么用?C++ CsvReader::randSort使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CsvReader
的用法示例。
在下文中一共展示了CsvReader::randSort方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WndProc
//
// FUNCTION: WndProc(HWND, UINT, WPARAM, LPARAM)
//
// PURPOSE: Processes messages for the main window.
//
// WM_COMMAND - process the application menu
// WM_PAINT - Paint the main window
// WM_DESTROY - post a quit message and return
//
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
static int cxClient, cyClient;
static int cxChar, cyChar;
static int iScollPos;
int wmId, wmEvent;
PAINTSTRUCT ps;
HDC hdc;
wstring s;
RECT rc = { 0, 0, 0, 0 };
TCHAR szText[200];
switch (message)
{
case WM_COMMAND:
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
// Parse the menu selections:
switch (wmId)
{
case IDM_ABOUT:
DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
break;
case IDM_EXIT:
DestroyWindow(hWnd);
break;
case IDM_FILE_OPEN:
OpenDialog(hWnd);
SetScrollPos(hWnd, SB_VERT, iScollPos, FALSE);
InvalidateRect(hWnd, NULL, TRUE);
break;
case IDM_FILE_SAVE:
OpenSaveDialog(hWnd);
break;
case IDM_RANDOMSORT_ITEM_1:
csvReader.randSort(0);
InvalidateRect(hWnd, NULL, TRUE);
break;
case IDM_RANDOMSORT_ITEM_2:
csvReader.randSort(1);
InvalidateRect(hWnd, NULL, TRUE);
break;
case IDM_RANDOMSORT_ITEM_3:
csvReader.randSort(2);
InvalidateRect(hWnd, NULL, TRUE);
break;
case IDM_RANDOMSORT_ITEM_4:
csvReader.randSort(3);
InvalidateRect(hWnd, NULL, TRUE);
break;
case IDM_RANDOMSORT_ITEM_5:
csvReader.randSort(4);
InvalidateRect(hWnd, NULL, TRUE);
break;
case IDM_RANDOMSORT_ITEM_6:
csvReader.randSort(5);
InvalidateRect(hWnd, NULL, TRUE);
break;
case IDM_RANDOMSORT_ITEM_7:
csvReader.randSort(6);
InvalidateRect(hWnd, NULL, TRUE);
break;
case IDM_RANDOMSORT_ITEM_8:
csvReader.randSort(7);
InvalidateRect(hWnd, NULL, TRUE);
break;
case IDM_RANDOMSORT_ITEM_9:
csvReader.randSort(8);
InvalidateRect(hWnd, NULL, TRUE);
break;
case IDM_RANDOMSORT_ITEM_10:
csvReader.randSort(9);
InvalidateRect(hWnd, NULL, TRUE);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
break;
case WM_CREATE:
hdc = GetDC(hWnd);
//Get Text Height and Width
TEXTMETRIC tm;
GetTextMetrics(hdc, &tm);
cxChar = tm.tmAveCharWidth;
cyChar = tm.tmHeight + tm.tmExternalLeading;
//.........这里部分代码省略.........