リンクラベルをラベルとして出力するように変更
@@ -16,6 +16,7 @@ | ||
16 | 16 | #include <malloc.h> |
17 | 17 | #include <memory.h> |
18 | 18 | #include <tchar.h> |
19 | +#include <commctrl.h> | |
19 | 20 | |
20 | 21 | |
21 | 22 | // TODO: プログラムに必要な追加ヘッダーをここで参照してください。 |
@@ -4,6 +4,8 @@ | ||
4 | 4 | #include "stdafx.h" |
5 | 5 | #include "Sample.h" |
6 | 6 | |
7 | +#pragma comment(lib, "comctl32.lib") | |
8 | + | |
7 | 9 | #define MAX_LOADSTRING 100 |
8 | 10 | |
9 | 11 | // グローバル変数: |
@@ -41,6 +43,16 @@ | ||
41 | 43 | } |
42 | 44 | |
43 | 45 | LoadLibrary(_T("riched20.dll")); |
46 | + InitCommonControls(); | |
47 | +#if 0 | |
48 | + INITCOMMONCONTROLSEX ic; | |
49 | + ic.dwSize = sizeof(INITCOMMONCONTROLSEX); | |
50 | + ic.dwICC = ICC_LINK_CLASS; | |
51 | + if(!InitCommonControlsEx(&ic)) | |
52 | + { | |
53 | + return FALSE; | |
54 | + } | |
55 | +#endif | |
44 | 56 | |
45 | 57 | hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_SAMPLE)); |
46 | 58 |
@@ -1164,7 +1164,15 @@ | ||
1164 | 1164 | string strStyle = CSRCWindow.MakeStyleString(ctrlstyle.ToString(), style.ToString()); |
1165 | 1165 | |
1166 | 1166 | string text = "\"<a>" + ctrl.Text + "</a>\""; |
1167 | - return CSRCControl.Serialize(form, ctrl, name, resIDs, text, "SysLink", strStyle, out buf); | |
1167 | + string strID = CSResID.MakeIDString("IDC_", name); | |
1168 | + string notStyle = CSRCWindow.GetNotStyleString(ctrl); | |
1169 | + buf += CSRCDialog.MakeScriptString(form, CSRCFileStream.DLGSCRIPTTYPE.LTEXT | |
1170 | + , ctrl, text, strID, CSRCWindow.MakeStyleString(style.ToString(), notStyle)); | |
1171 | + buf += CRLF; | |
1172 | + | |
1173 | + resIDs.Add(strID); | |
1174 | + return true; | |
1175 | + //return CSRCControl.Serialize(form, ctrl, name, resIDs, text, "SysLink", strStyle, out buf); | |
1168 | 1176 | } |
1169 | 1177 | #endregion |
1170 | 1178 |