projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add support for generating project files for use with Dev-C++, contributed
[u/mdw/putty]
/
windows
/
window.c
diff --git
a/windows/window.c
b/windows/window.c
index
68920d3
..
7133493
100644
(file)
--- a/
windows/window.c
+++ b/
windows/window.c
@@
-50,9
+50,9
@@
/* Maximum number of sessions on saved-session submenu */
#define MENU_SAVED_MAX ((IDM_SAVED_MAX-IDM_SAVED_MIN) / MENU_SAVED_STEP)
/* Maximum number of sessions on saved-session submenu */
#define MENU_SAVED_MAX ((IDM_SAVED_MAX-IDM_SAVED_MIN) / MENU_SAVED_STEP)
-#define WM_IGNORE_CLIP (WM_
XUSER
+ 2)
-#define WM_FULLSCR_ON_MAX (WM_
XUSER
+ 3)
-#define WM_AGENT_CALLBACK (WM_
XUSER
+ 4)
+#define WM_IGNORE_CLIP (WM_
APP
+ 2)
+#define WM_FULLSCR_ON_MAX (WM_
APP
+ 3)
+#define WM_AGENT_CALLBACK (WM_
APP
+ 4)
/* Needed for Chinese support and apparently not always defined. */
#ifndef VK_PROCESSKEY
/* Needed for Chinese support and apparently not always defined. */
#ifndef VK_PROCESSKEY
@@
-2070,9
+2070,9
@@
static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
/* Enable or disable the scroll bar, etc */
{
/* Enable or disable the scroll bar, etc */
{
- LONG nflg, flag = GetWindowLong(hwnd, GWL_STYLE);
+ LONG nflg, flag = GetWindowLong
Ptr
(hwnd, GWL_STYLE);
LONG nexflag, exflag =
LONG nexflag, exflag =
- GetWindowLong(hwnd, GWL_EXSTYLE);
+ GetWindowLong
Ptr
(hwnd, GWL_EXSTYLE);
nexflag = exflag;
if (cfg.alwaysontop != prev_cfg.alwaysontop) {
nexflag = exflag;
if (cfg.alwaysontop != prev_cfg.alwaysontop) {
@@
-2111,9
+2111,9
@@
static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
if (nflg != flag || nexflag != exflag) {
if (nflg != flag)
if (nflg != flag || nexflag != exflag) {
if (nflg != flag)
- SetWindowLong(hwnd, GWL_STYLE, nflg);
+ SetWindowLong
Ptr
(hwnd, GWL_STYLE, nflg);
if (nexflag != exflag)
if (nexflag != exflag)
- SetWindowLong(hwnd, GWL_EXSTYLE, nexflag);
+ SetWindowLong
Ptr
(hwnd, GWL_EXSTYLE, nexflag);
SetWindowPos(hwnd, NULL, 0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOCOPYBITS |
SetWindowPos(hwnd, NULL, 0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOCOPYBITS |
@@
-4513,7
+4513,7
@@
void write_clip(void *frontend, wchar_t * data, int len, int must_deselect)
rtfsize = 100 + strlen(cfg.font.name);
rtf = snewn(rtfsize, char);
rtfsize = 100 + strlen(cfg.font.name);
rtf = snewn(rtfsize, char);
- sprintf(rtf, "{\\rtf1\\ansi%d{\\fonttbl\\f0\\fmodern %s;}\\f0",
+ sprintf(rtf, "{\\rtf1\\ansi%d{\\fonttbl\\f0\\fmodern %s;}\\f0
",
GetACP(), cfg.font.name);
rtflen = strlen(rtf);
GetACP(), cfg.font.name);
rtflen = strlen(rtf);
@@
-4942,7
+4942,7
@@
static int is_full_screen()
{
if (!IsZoomed(hwnd))
return FALSE;
{
if (!IsZoomed(hwnd))
return FALSE;
- if (GetWindowLong(hwnd, GWL_STYLE) & WS_CAPTION)
+ if (GetWindowLong
Ptr
(hwnd, GWL_STYLE) & WS_CAPTION)
return FALSE;
return TRUE;
}
return FALSE;
return TRUE;
}
@@
-4988,13
+4988,13
@@
static void make_full_screen()
return;
/* Remove the window furniture. */
return;
/* Remove the window furniture. */
- style = GetWindowLong(hwnd, GWL_STYLE);
+ style = GetWindowLong
Ptr
(hwnd, GWL_STYLE);
style &= ~(WS_CAPTION | WS_BORDER | WS_THICKFRAME);
if (cfg.scrollbar_in_fullscreen)
style |= WS_VSCROLL;
else
style &= ~WS_VSCROLL;
style &= ~(WS_CAPTION | WS_BORDER | WS_THICKFRAME);
if (cfg.scrollbar_in_fullscreen)
style |= WS_VSCROLL;
else
style &= ~WS_VSCROLL;
- SetWindowLong(hwnd, GWL_STYLE, style);
+ SetWindowLong
Ptr
(hwnd, GWL_STYLE, style);
/* Resize ourselves to exactly cover the nearest monitor. */
get_fullscreen_rect(&ss);
/* Resize ourselves to exactly cover the nearest monitor. */
get_fullscreen_rect(&ss);
@@
-5016,7
+5016,7
@@
static void clear_full_screen()
DWORD oldstyle, style;
/* Reinstate the window furniture. */
DWORD oldstyle, style;
/* Reinstate the window furniture. */
- style = oldstyle = GetWindowLong(hwnd, GWL_STYLE);
+ style = oldstyle = GetWindowLong
Ptr
(hwnd, GWL_STYLE);
style |= WS_CAPTION | WS_BORDER;
if (cfg.resize_action == RESIZE_DISABLED)
style &= ~WS_THICKFRAME;
style |= WS_CAPTION | WS_BORDER;
if (cfg.resize_action == RESIZE_DISABLED)
style &= ~WS_THICKFRAME;
@@
-5027,7
+5027,7
@@
static void clear_full_screen()
else
style &= ~WS_VSCROLL;
if (style != oldstyle) {
else
style &= ~WS_VSCROLL;
if (style != oldstyle) {
- SetWindowLong(hwnd, GWL_STYLE, style);
+ SetWindowLong
Ptr
(hwnd, GWL_STYLE, style);
SetWindowPos(hwnd, NULL, 0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
SWP_FRAMECHANGED);
SetWindowPos(hwnd, NULL, 0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
SWP_FRAMECHANGED);