blob: 443d54b42fcd59aff4d2a71627552706cbb52654 (
plain)
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
50
51
52
53
54
55
56
57
58
|
// Night Security StubDlg.cpp : implementation file
//
#include "stdafx.h"
#include "CmdLineDlg.h"
/////////////////////////////////////////////////////////////////////////////
// CCmdLineDlg dialog
CCmdLineDlg::CCmdLineDlg()
{
}
/////////////////////////////////////////////////////////////////////////////
// CCmdLineDlg message handlers
LRESULT CCmdLineDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
// Need app pointer to access components
string sHelpText;
string sTemp;
// Loop through'm
for(int nCnt = 0; nCnt < g_aComponents.size(); nCnt++)
{
// Is it a Windows Component?
if(g_aComponents[nCnt]->GetType() == COMPONENT_WIN)
{
// Get CmdLine
sTemp = g_aComponents[nCnt]->GetInfoStr(nsCmdLine, _T(""));
// If component returns null then can't be called from
// command line
if(!sTemp.empty())
{
// Now add it to the complete string
sHelpText += _T(" -") + sTemp + _T("\t");
// Add Component Name
sHelpText += g_aComponents[nCnt]->GetName() + _T("\r\n");
}
}
}
// Put the text in Dialog
SetDlgItemText(IDC_PARAMETERS, sHelpText);
bHandled = FALSE; // Let CSimpleDialog also have a shot
return TRUE; // return TRUE unless you set the focus to a control
}
|