00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef CADDSCREEN_H
00016 #define CADDSCREEN_H
00017
00018 #include "CString.h"
00019
00020 #define WINDOWS_LEAN_AND_MEAN
00021 #include <windows.h>
00022
00023 class CConfig;
00024
00026 class CAddScreen {
00027 public:
00028 CAddScreen(HWND parent, CConfig*, const CString& name);
00029 ~CAddScreen();
00030
00032
00033
00035
00039 bool doModal();
00040
00042
00043
00044
00045 CString getName() const;
00046
00048
00049 private:
00050 typedef std::vector<CString> CStringList;
00051
00052 void getAliases(CStringList&) const;
00053 void getOptions(CConfig::CScreenOptions&) const;
00054
00055 static void tokenize(CStringList& tokens, const CString& src);
00056 static bool isNameInList(const CStringList& tokens,
00057 const CString& src);
00058
00059 void init(HWND hwnd);
00060 bool save(HWND hwnd);
00061
00062
00063 BOOL doDlgProc(HWND, UINT, WPARAM, LPARAM);
00064 static BOOL CALLBACK dlgProc(HWND, UINT, WPARAM, LPARAM);
00065
00066 private:
00067 static CAddScreen* s_singleton;
00068
00069 HWND m_parent;
00070 CConfig* m_config;
00071 CString m_name;
00072 };
00073
00074 #endif