| 1 |
#ifndef MFCFUNCTIONS_H |
|---|
| 2 |
#define MFCFUNCTIONS_H |
|---|
| 3 |
|
|---|
| 4 |
typedef LPARAM(*PFNMTICOPYDATA)(const CTreeCtrl&, HTREEITEM, LPARAM); |
|---|
| 5 |
|
|---|
| 6 |
void DeleteAllSelectedItems(CListCtrl* listCtrl ); |
|---|
| 7 |
void SetupListCtrl(CListCtrl* listCtrl); |
|---|
| 8 |
void SetupButton(CXTButton* button ); |
|---|
| 9 |
void SetupTitle(CStatic* s ); |
|---|
| 10 |
|
|---|
| 11 |
void AddListCtrlItems(CListCtrl& l , vector<string> & v ); |
|---|
| 12 |
|
|---|
| 13 |
void GetAllComboBoxItems(CComboBox* cb,vector<string>* v ); |
|---|
| 14 |
void GetAllListCtrlItems(CListCtrl* l , vector<string>* v , int subItem = 0 ); |
|---|
| 15 |
void GetSelListCtrlItems(CListCtrl* l , vector<string>* v , int subItem = 0); |
|---|
| 16 |
int GetSelListCtrlItemPos(CListCtrl* l); |
|---|
| 17 |
|
|---|
| 18 |
string GetTextFromUser(const string& title); |
|---|
| 19 |
bool SaveFileFromCFileDialog(string& defaultDir , string & file, const string& ext = "d", const string& extensionPattern = "D Files (*.d)|*.d|All Files (*.*)|*.*||" ); |
|---|
| 20 |
bool GetFilesFromCFileDialog(string& defaultDir ,vector<string> & files , const string& ext = "d", const string& filter = "D Files (*.d)|*.d|All Files (*.*)|*.*||" ,CWnd* wnd = NULL); |
|---|
| 21 |
bool GetFileFromCFileDialog( string& defaultDir , string& file, const string& ext = "d", const string& x = "D Source Files(*.d)|*.d", CWnd* wnd = NULL); |
|---|
| 22 |
bool GetDirFromCDirDialog(string& dir, const string& defaultDir); |
|---|
| 23 |
string GetSelTreeCtrlItem(CTreeCtrl* t); |
|---|
| 24 |
void ExpandAllTreeItems(CTreeCtrl* t); |
|---|
| 25 |
void CollapseAllTreeItems(CTreeCtrl* t); |
|---|
| 26 |
void DeleteAllComboItems(CComboBox* c); |
|---|
| 27 |
|
|---|
| 28 |
int FindMenuItem(CMenu* Menu, LPCTSTR MenuString); |
|---|
| 29 |
HTREEITEM MoveTreeItem(CTreeCtrl& tree, HTREEITEM hItem, HTREEITEM hItemTo, |
|---|
| 30 |
BOOL bCopyOnly = FALSE, PFNMTICOPYDATA pfnCopyData = NULL, |
|---|
| 31 |
HTREEITEM hItemPos = TVI_LAST); |
|---|
| 32 |
|
|---|
| 33 |
LPARAM CopyData(const CTreeCtrl& tree, HTREEITEM hItem, LPARAM lParam); |
|---|
| 34 |
void LoadAndShowMenu(int menuName, const CPoint & point, CWnd* owner); |
|---|
| 35 |
extern CFont* defaultTitleFont; |
|---|
| 36 |
#endif |
|---|