-
Notifications
You must be signed in to change notification settings - Fork 21
/
FormType.h
91 lines (81 loc) · 2.94 KB
/
FormType.h
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
// Copyright (C) FlatGlobus([email protected]) All rights reserved.
//
// This file is a part of the WTLBuilder.
// The use and distribution terms for this software are covered by the
// Microsoft Public License (http://opensource.org/licenses/MS-PL)
// which can be found in the file MS-PL.txt at the root folder.
#ifndef __FORMTYPE__H
#define __FORMTYPE__H
//////////////////////////////////////////////////////////////////////////
#include "resource.h"
#include "Path.h"
//{{WTLBUILDER_INCLUDE_DECLARATION
#include "Panel.h"
//}}WTLBUILDER_INCLUDE_DECLARATION
//{{WTLBUILDER_CONTROL_ID_DECLARATION
#define IDC_CFORMTYPE_PANEL1 1001
#define IDC_FORMS_LIST 1000
#define IDC_CFORMTYPE_STATIC6 1006
#define IDC_CFORMTYPE_PANEL8 1008
#define IDC_CFORMTYPE_STATIC11 1011
#define IDC_PATH_EDIT 1012
#define ID_BROWSE 1013
#define IDC_CFORMTYPE_STATIC14 1014
#define IDC_CLASS_NAME_EDIT 1016
#define IDC_DIALOGIMPL1_STATIC21 1021
#define IDC_FILE_NAME_EDIT 1022
//}}WTLBUILDER_CONTROL_ID_DECLARATION
class CFormType:public CDialogImpl<CFormType>
{
CToolTipCtrl m_toolTip;
//{{WTLBUILDER_MEMBER_DECLARATION
CFont m_formFont;
Panel::CPanel m_panel1;
CListViewCtrl m_formsList;
CStatic m_static6;
Panel::CPanel m_panel8;
CButton m_create;
CButton m_cancel;
CStatic m_static11;
CEdit m_path;
CButton m_browse;
CStatic m_static14;
CEdit m_name;
CStatic m_static21;
CEdit m_filename;
//}}WTLBUILDER_MEMBER_DECLARATION
CStringArray tmpList;
CImageList m_images;
CString location;
CString formName;
CString filename;
CString templatePath;
CString componentType;
void FillTemplates(LPCTSTR _name,LPCTSTR _page,HBITMAP _bitmap,int type);
void FillTemplates();
CString ShowBrowseDlg();
BOOL CheckData();
void CreateFileName();
public:
enum { IDD = IDD_NULL };
BEGIN_MSG_MAP(CFormType)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
COMMAND_ID_HANDLER(IDOK, OnCloseCmd)
COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd)
COMMAND_ID_HANDLER(ID_BROWSE, OnBrowse)
NOTIFY_HANDLER(IDC_FORMS_LIST,NM_CLICK,OnItemClick)
COMMAND_CODE_HANDLER(EN_CHANGE,OnChange)
END_MSG_MAP()
LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
LRESULT OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
LRESULT OnItemClick(WPARAM,LPNMHDR,BOOL &);
LRESULT OnBrowse(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
LRESULT OnChange(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
CString GetLocation();
CString GetFormName();
CString GetTemplatePath();
CString GetComponentType();
CString GetFileName();
};
//////////////////////////////////////////////////////////////////////////
#endif