diff options
Diffstat (limited to 'CmdLine/CmdLineDlg.cpp')
-rw-r--r-- | CmdLine/CmdLineDlg.cpp | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/CmdLine/CmdLineDlg.cpp b/CmdLine/CmdLineDlg.cpp new file mode 100644 index 0000000..443d54b --- /dev/null +++ b/CmdLine/CmdLineDlg.cpp @@ -0,0 +1,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 +} + + |