#define PUTTY_DO_GLOBALS /* actually _define_ globals */
#include "putty.h"
#include "win_res.h"
+#include "sizetip.h"
#define IDM_SHOWLOG 0x0010
#define IDM_NEWSESS 0x0020
MSG msg;
int guess_width, guess_height;
+ putty_inst = inst;
+
winsock_ver = MAKEWORD(1, 1);
if (WSAStartup(winsock_ver, &wsadata)) {
MessageBox(NULL, "Unable to initialise WinSock", "WinSock Error",
case WM_IGNORE_SIZE:
ignore_size = TRUE; /* don't panic on next WM_SIZE msg */
break;
+ case WM_ENTERSIZEMOVE:
+ EnableSizeTip(1);
+ break;
+ case WM_EXITSIZEMOVE:
+ EnableSizeTip(0);
+ break;
case WM_SIZING:
{
int width, height, w, h, ew, eh;
height = r->bottom - r->top - extra_height;
w = (width + font_width/2) / font_width; if (w < 1) w = 1;
h = (height + font_height/2) / font_height; if (h < 1) h = 1;
+ UpdateSizeTip(hwnd, w, h);
ew = width - w * font_width;
eh = height - h * font_height;
if (ew != 0) {