OSDN Git Service

Change to specify explicitly code pages.
[ffftp/ffftp.git] / taskwin.c
index 1465aa3..9e269d3 100644 (file)
--- a/taskwin.c
+++ b/taskwin.c
@@ -28,6 +28,8 @@
 /============================================================================*/\r
 \r
 #define  STRICT\r
+// IPv6対応\r
+#include <winsock2.h>\r
 #include <windows.h>\r
 #include <stdio.h>\r
 #include <stdlib.h>\r
 #include <windowsx.h>\r
 #include <commctrl.h>\r
 #include <stdarg.h>\r
-#include <winsock.h>\r
+// IPv6対応\r
+//#include <winsock.h>\r
 \r
 #include "common.h"\r
 #include "resource.h"\r
 \r
-#define TASK_BUFSIZE   (16*1024)\r
+// Windows 9x系をサポートしないため不要\r
+//#define TASK_BUFSIZE (16*1024)\r
 \r
 \r
 \r
@@ -90,7 +94,9 @@ int MakeTaskWindow(HWND hWnd, HINSTANCE hInst)
 \r
        if(hWndTask != NULL)\r
        {\r
-               SendMessage(hWndTask, EM_LIMITTEXT, TASK_BUFSIZE, 0);\r
+               // Windows 9x系をサポートしないため不要\r
+//             SendMessage(hWndTask, EM_LIMITTEXT, TASK_BUFSIZE, 0);\r
+               SendMessage(hWndTask, EM_LIMITTEXT, 0x7fffffff, 0);\r
 \r
                if(ListFont != NULL)\r
                        SendMessage(hWndTask, WM_SETFONT, (WPARAM)ListFont, MAKELPARAM(TRUE, 0));\r
@@ -177,16 +183,17 @@ void SetTaskMsg(char *szFormat, ...)
                                Pos = SendMessage(GetTaskWnd(), WM_GETTEXTLENGTH, 0, 0);\r
 \r
                                /* テキストサイズのリミット値をチェック */\r
-                               if((Pos + strlen(szBuf)) >= TASK_BUFSIZE)\r
-                               {\r
-                                       /* リミットを越えそうなら、先頭部分を切り捨てる */\r
-                                       Pos = SendMessage(GetTaskWnd(), EM_LINEFROMCHAR, TASK_BUFSIZE/10, 0) + 1;\r
-                                       Pos = SendMessage(GetTaskWnd(), EM_LINEINDEX, Pos, 0);\r
-                                       SendMessage(GetTaskWnd(), EM_SETSEL, 0, Pos);\r
-                                       SendMessage(GetTaskWnd(), EM_REPLACESEL, FALSE, (LPARAM)"");\r
-\r
-                                       Pos = SendMessage(GetTaskWnd(), WM_GETTEXTLENGTH, 0, 0);\r
-                               }\r
+                               // Windows 9x系をサポートしないため不要\r
+//                             if((Pos + strlen(szBuf)) >= TASK_BUFSIZE)\r
+//                             {\r
+//                                     /* リミットを越えそうなら、先頭部分を切り捨てる */\r
+//                                     Pos = SendMessage(GetTaskWnd(), EM_LINEFROMCHAR, TASK_BUFSIZE/10, 0) + 1;\r
+//                                     Pos = SendMessage(GetTaskWnd(), EM_LINEINDEX, Pos, 0);\r
+//                                     SendMessage(GetTaskWnd(), EM_SETSEL, 0, Pos);\r
+//                                     SendMessage(GetTaskWnd(), EM_REPLACESEL, FALSE, (LPARAM)"");\r
+//\r
+//                                     Pos = SendMessage(GetTaskWnd(), WM_GETTEXTLENGTH, 0, 0);\r
+//                             }\r
 \r
                                SendMessage(GetTaskWnd(), EM_SETSEL, Pos, Pos);\r
                                SendMessage(GetTaskWnd(), EM_REPLACESEL, FALSE, (LPARAM)szBuf);\r