Introduce a sane interface function, from_backend(), for backends to
[u/mdw/putty] / sizetip.c
index 94407ae..439d88c 100644 (file)
--- a/sizetip.c
+++ b/sizetip.c
@@ -1,10 +1,18 @@
 #include <windows.h>
+#ifndef AUTO_WINSOCK
+#ifdef WINSOCK_TWO
+#include <winsock2.h>
+#else
+#include <winsock.h>
+#endif
+#endif
 #include <winreg.h>
 #include <tchar.h>
 #include <stdio.h>
 #include <stdlib.h>
 
 #include "putty.h"
+#include "winstuff.h"
 
 static ATOM tip_class = 0;
 
@@ -107,7 +115,7 @@ void UpdateSizeTip(HWND src, int cx, int cy)
             wc.lpfnWndProc = SizeTipWndProc;
             wc.cbClsExtra = 0;
             wc.cbWndExtra = 0;
-            wc.hInstance = putty_inst;
+            wc.hInstance = hinst;
             wc.hIcon = NULL;
             wc.hCursor = NULL;
             wc.hbrBackground = NULL;
@@ -164,7 +172,7 @@ void UpdateSizeTip(HWND src, int cx, int cy)
 
         tip_wnd = CreateWindowEx(WS_EX_TOOLWINDOW|WS_EX_TOPMOST, MAKEINTRESOURCE(tip_class), str, WS_POPUP,
                                 ix, iy, sz.cx, sz.cy,
-                                NULL, NULL, putty_inst, NULL);
+                                NULL, NULL, hinst, NULL);
 
         ShowWindow(tip_wnd, SW_SHOWNOACTIVATE);