OSDN Git Service

Fix bugs of mirroring transfer.
[ffftp/ffftp.git] / statuswin.c
index 735dfbb..c22d10d 100644 (file)
@@ -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
@@ -37,7 +39,8 @@
 #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
@@ -64,6 +67,8 @@ static int SbarColWidth[5] = { 70, 230, 410, 570, -1 };
 int MakeStatusBarWindow(HWND hWnd, HINSTANCE hInst)\r
 {\r
        int Sts;\r
+       // 高DPI対応\r
+       int i;\r
 \r
        Sts = FFFTP_FAIL;\r
        hWndSbar = CreateWindowEx(0,\r
@@ -74,6 +79,9 @@ int MakeStatusBarWindow(HWND hWnd, HINSTANCE hInst)
 \r
        if(hWndSbar != NULL)\r
        {\r
+               // 高DPI対応\r
+               for(i = 0; i < sizeof(SbarColWidth) / sizeof(int) - 1; i++)\r
+                       SbarColWidth[i] = CalcPixelX(SbarColWidth[i]);\r
                SendMessage(hWndSbar, SB_SETPARTS, sizeof(SbarColWidth)/sizeof(int), (LPARAM)SbarColWidth);\r
                ShowWindow(hWndSbar, SW_SHOW);\r
                Sts = FFFTP_SUCCESS;\r