-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathAddContentTypeDlg.cpp
More file actions
39 lines (28 loc) · 853 Bytes
/
AddContentTypeDlg.cpp
File metadata and controls
39 lines (28 loc) · 853 Bytes
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
#include "stdafx.h"
#include "AddContentTypeDlg.h"
LRESULT CAddContentTypeDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
CenterWindow();
CRichEditCtrl edit(GetDlgItem(IDC_EDIT_CONTENTTYPE));
edit.SetFocus();
return 0;
}
LRESULT CAddContentTypeDlg::OnBnClickedCancel(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
EndDialog(wID);
return 0;
}
LRESULT CAddContentTypeDlg::OnBnClickedOk(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
CRichEditCtrl edit(GetDlgItem(IDC_EDIT_CONTENTTYPE));
edit.GetWindowText(m_strContentType);
if (m_strContentType.GetLength() > 0)
{
EndDialog(wID);
}
return 0;
}
const CString& CAddContentTypeDlg::GetContentType() const
{
return m_strContentType;
}