-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUTL_Cmd.h
49 lines (40 loc) · 847 Bytes
/
UTL_Cmd.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#pragma once
#include "stdafx.h"
class UTL_Cmd
{
public:
enum ARGUMENT_TYPE { _STRING, _TRUE, _BOOL, _INT, _COLOR, _ENUM };
struct ARGUMENT {
vector<wstring> text;
ARGUMENT_TYPE type;
void* pVar;
map<wstring, UINT>* pTable;
wstring help;
};
enum Type {
Ok = MB_OK,
OkCancel = MB_OKCANCEL,
YesNo = MB_YESNO,
YesNoCancel = MB_YESNOCANCEL,
};
enum Icon {
NoIcon = 0x00000000L,
Information = MB_ICONINFORMATION,
Question = MB_ICONQUESTION,
Warning = MB_ICONWARNING,
Error = MB_ICONERROR,
};
enum DefaultButton {
Def1 = MB_DEFBUTTON1,
Def2 = MB_DEFBUTTON2,
Def3 = MB_DEFBUTTON3,
};
private:
vector<ARGUMENT> mArguments;
public:
UTL_Cmd();
~UTL_Cmd();
void Add(ARGUMENT_TYPE _type, int _num, ...);
int ParseCommandLine(int _argc, _TCHAR* _pArgv[], int& _correctParameters);
void Help();
};