862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
|
SetWindowText (hwnd,
cfg.win_name_always ? window_name : icon_name);
break;
}
if (wParam == SIZE_RESTORED || wParam == SIZE_MAXIMIZED)
SetWindowText (hwnd, window_name);
if (!ignore_size) {
int width, height, w, h, ew, eh;
width = LOWORD(lParam);
height = HIWORD(lParam);
w = width / font_width; if (w < 1) w = 1;
h = height / font_height; if (h < 1) h = 1;
#if 0 /* we have fixed this using WM_SIZING now */
ew = width - w * font_width;
|
|
>
>
>
|
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
|
SetWindowText (hwnd,
cfg.win_name_always ? window_name : icon_name);
break;
}
if (wParam == SIZE_RESTORED || wParam == SIZE_MAXIMIZED)
SetWindowText (hwnd, window_name);
if (!ignore_size) {
int width, height, w, h;
#if 0 /* we have fixed this using WM_SIZING now */
int ew, eh;
#endif
width = LOWORD(lParam);
height = HIWORD(lParam);
w = width / font_width; if (w < 1) w = 1;
h = height / font_height; if (h < 1) h = 1;
#if 0 /* we have fixed this using WM_SIZING now */
ew = width - w * font_width;
|
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
|
SetBkMode (hdc, OPAQUE);
TextOut (hdc, x, y, text, len);
if (bold_mode == BOLD_SHADOW && (attr & ATTR_BOLD)) {
SetBkMode (hdc, TRANSPARENT);
TextOut (hdc, x-1, y, text, len);
}
if (und_mode == UND_LINE && (attr & ATTR_UNDER)) {
SelectObject (hdc, CreatePen(PS_SOLID, 0, fg));
MoveToEx (hdc, x, y+descent, NULL);
LineTo (hdc, x+len*font_width, y+descent);
}
if (attr & ATTR_PASCURS) {
POINT pts[5];
pts[0].x = pts[1].x = pts[4].x = x;
pts[2].x = pts[3].x = x+font_width-1;
pts[0].y = pts[3].y = pts[4].y = y;
pts[1].y = pts[2].y = y+font_height-1;
SelectObject (hdc, CreatePen(PS_SOLID, 0, colours[23]));
Polyline (hdc, pts, 5);
}
}
/*
* Translate a WM_(SYS)?KEYDOWN message into a string of ASCII
* codes. Returns number of bytes used.
*/
|
>
|
>
>
>
|
>
>
|
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
|
SetBkMode (hdc, OPAQUE);
TextOut (hdc, x, y, text, len);
if (bold_mode == BOLD_SHADOW && (attr & ATTR_BOLD)) {
SetBkMode (hdc, TRANSPARENT);
TextOut (hdc, x-1, y, text, len);
}
if (und_mode == UND_LINE && (attr & ATTR_UNDER)) {
HPEN oldpen;
oldpen = SelectObject (hdc, CreatePen(PS_SOLID, 0, fg));
MoveToEx (hdc, x, y+descent, NULL);
LineTo (hdc, x+len*font_width, y+descent);
oldpen = SelectObject (hdc, oldpen);
DeleteObject (oldpen);
}
if (attr & ATTR_PASCURS) {
POINT pts[5];
HPEN oldpen;
pts[0].x = pts[1].x = pts[4].x = x;
pts[2].x = pts[3].x = x+font_width-1;
pts[0].y = pts[3].y = pts[4].y = y;
pts[1].y = pts[2].y = y+font_height-1;
oldpen = SelectObject (hdc, CreatePen(PS_SOLID, 0, colours[23]));
Polyline (hdc, pts, 5);
oldpen = SelectObject (hdc, oldpen);
DeleteObject (oldpen);
}
}
/*
* Translate a WM_(SYS)?KEYDOWN message into a string of ASCII
* codes. Returns number of bytes used.
*/
|