~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update the text format of the public key as the comment box is edited
[sgt/putty]
/
sizetip.c
diff --git
a/sizetip.c
b/sizetip.c
index
94407ae
..
8a37b47
100644
(file)
--- a/
sizetip.c
+++ b/
sizetip.c
@@
-5,6
+5,7
@@
#include <stdlib.h>
#include "putty.h"
#include <stdlib.h>
#include "putty.h"
+#include "winstuff.h"
static ATOM tip_class = 0;
static ATOM tip_class = 0;
@@
-42,7
+43,7
@@
static LRESULT CALLBACK SizeTipWndProc(HWND hWnd, UINT nMsg,
Rectangle(hdc, cr.left, cr.top, cr.right, cr.bottom);
wtlen = GetWindowTextLength(hWnd);
Rectangle(hdc, cr.left, cr.top, cr.right, cr.bottom);
wtlen = GetWindowTextLength(hWnd);
- wt = (LPTSTR)malloc((wtlen+1)*sizeof(TCHAR));
+ wt = (LPTSTR)
s
malloc((wtlen+1)*sizeof(TCHAR));
GetWindowText(hWnd, wt, wtlen+1);
SetTextColor(hdc, tip_text);
GetWindowText(hWnd, wt, wtlen+1);
SetTextColor(hdc, tip_text);
@@
-50,7
+51,7
@@
static LRESULT CALLBACK SizeTipWndProc(HWND hWnd, UINT nMsg,
TextOut(hdc, cr.left+3, cr.top+3, wt, wtlen);
TextOut(hdc, cr.left+3, cr.top+3, wt, wtlen);
- free(wt);
+
s
free(wt);
SelectObject(hdc, holdbr);
DeleteObject(hbr);
SelectObject(hdc, holdbr);
DeleteObject(hbr);
@@
-107,7
+108,7
@@
void UpdateSizeTip(HWND src, int cx, int cy)
wc.lpfnWndProc = SizeTipWndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.lpfnWndProc = SizeTipWndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
- wc.hInstance =
putty_
inst;
+ wc.hInstance =
h
inst;
wc.hIcon = NULL;
wc.hCursor = NULL;
wc.hbrBackground = NULL;
wc.hIcon = NULL;
wc.hCursor = NULL;
wc.hbrBackground = NULL;
@@
-164,7
+165,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,
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,
h
inst, NULL);
ShowWindow(tip_wnd, SW_SHOWNOACTIVATE);
ShowWindow(tip_wnd, SW_SHOWNOACTIVATE);