summaryrefslogtreecommitdiff
path: root/DropDlg.h
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2003-09-16 13:44:06 +0000
committerStef Walter <stef@thewalter.net>2003-09-16 13:44:06 +0000
commit5c521d256815161f4af9066bc4bb9fea7fa1accb (patch)
tree56ca291cd06833f053f047dc7bb00484f3129a2f /DropDlg.h
parentb0b7ef8d60e3603d6bcc9af45cd9ef0d6094fb9d (diff)
Initial ImportHEADmaster
Diffstat (limited to 'DropDlg.h')
-rw-r--r--DropDlg.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/DropDlg.h b/DropDlg.h
new file mode 100644
index 0000000..ac6613c
--- /dev/null
+++ b/DropDlg.h
@@ -0,0 +1,63 @@
+// DropDlg.h : Declaration of the CDropDlg
+
+#ifndef __DROPDLG_H_
+#define __DROPDLG_H_
+
+#include "resource.h" // main symbols
+#include <atlhost.h>
+
+/////////////////////////////////////////////////////////////////////////////
+// CDropDlg
+class CDropDlg :
+ public CDialogImpl<CDropDlg>,
+ public CSizingDialog<CDropDlg>,
+ public CPersistPosWindow<CDropDlg>
+{
+public:
+ CDropDlg();
+
+ enum { IDD = IDD_DROPDLG };
+
+BEGIN_MSG_MAP(CDropDlg)
+ MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
+ MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
+ MESSAGE_HANDLER(WM_DROPFILES, OnDropFiles)
+ COMMAND_ID_HANDLER(IDC_RUN, OnRun)
+ COMMAND_ID_HANDLER(IDOK, OnClose)
+ COMMAND_ID_HANDLER(IDCANCEL, OnClose)
+ CHAIN_MSG_MAP(CSizingDialog<CDropDlg>)
+END_MSG_MAP()
+
+// Handler prototypes:
+// LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
+// LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
+// LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
+
+ LRESULT OnRun(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
+ LRESULT OnDropFiles(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
+ LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
+ LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
+ LRESULT OnClose(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
+
+protected:
+ void SetRunMode(bool isRunning);
+ void ReportError(HRESULT hr);
+
+ string GetCurBatch();
+ HRESULT RunWithFolder(const string& batch, const string& folderName);
+ HRESULT RunWithFile(const string& batch, const string& fileName);
+
+ static BOOL WINAPI OutputString(LPCTSTR data, LPVOID param);
+ static string CleanFolder(const string& folderName);
+ static bool IsDots(const string& fileName);
+
+ CEdit m_ctlLog;
+ CComboBox m_ctlBatch;
+ string m_baseDir;
+ CRegSettings m_settings; // Our registry key
+
+ bool m_isRunning;
+ bool m_isCancelled;
+};
+
+#endif //__DROPDLG_H_