OSDN Git Service

crystaledit: Make almost the same code into a common function
[winmerge-jp/winmerge-jp.git] / Externals / crystaledit / editlib / DDXHelper.h
1 #pragma once\r
2 \r
3 inline void DDX_Check(CDataExchange* pDX, int nIDC, bool& value)\r
4 {\r
5         BOOL BOOL_value = value;\r
6         DDX_Check(pDX, nIDC, BOOL_value);\r
7         value = !!BOOL_value;\r
8 }\r
9 \r
10 inline void DDX_Radio(CDataExchange* pDX, int nIDC, bool& value)\r
11 {\r
12         BOOL BOOL_value = value;\r
13         DDX_Radio(pDX, nIDC, BOOL_value);\r
14         value = !!BOOL_value;\r
15 }\r
16 \r
17 inline void DDX_Text(CDataExchange* pDX, int nIDC, std::basic_string<TCHAR>& value)\r
18 {\r
19         CString cstrValue = value.c_str();\r
20         DDX_Text(pDX, nIDC, cstrValue);\r
21         value = cstrValue;\r
22 }\r
23 \r
24 inline void DDX_CBString(CDataExchange* pDX, int nIDC, std::basic_string<TCHAR>& value)\r
25 {\r
26         CString cstrValue = value.c_str();\r
27         DDX_CBString(pDX, nIDC, cstrValue);\r
28         value = cstrValue;\r
29 }\r
30 \r
31 inline void DDX_CBStringExact(CDataExchange* pDX, int nIDC, std::basic_string<TCHAR>& value)\r
32 {\r
33         CString cstrValue = value.c_str();\r
34         DDX_CBStringExact(pDX, nIDC, cstrValue);\r
35         value = cstrValue;\r
36 }\r
37 \r