Diff

Differences From Artifact [0ad983560a]:

To Artifact [106513659e]:


361
362
363
364
365
366
367

368
369
370




371
372
373
374
375




376
377
378
379
380
381
382
361
362
363
364
365
366
367
368



369
370
371
372





373
374
375
376
377
378
379
380
381
382
383







+
-
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+







	    guess_width = r.right - r.left;
	if (guess_height > r.bottom - r.top)
	    guess_height = r.bottom - r.top;
    }

    {
	int winmode = WS_OVERLAPPEDWINDOW|WS_VSCROLL;
        int exwinmode = 0;
	if (!cfg.scrollbar) winmode &= ~(WS_VSCROLL);
	if (cfg.locksize)   winmode &= ~(WS_THICKFRAME|WS_MAXIMIZEBOX);
	hwnd = CreateWindow (appname, appname,
	if (!cfg.scrollbar)  winmode &= ~(WS_VSCROLL);
	if (cfg.locksize)    winmode &= ~(WS_THICKFRAME|WS_MAXIMIZEBOX);
        if (cfg.alwaysontop) exwinmode = WS_EX_TOPMOST;
        hwnd = CreateWindowEx (exwinmode, appname, appname,
			     winmode,
			     CW_USEDEFAULT, CW_USEDEFAULT,
			     guess_width, guess_height,
			     NULL, NULL, inst, NULL);
    }
                              winmode, CW_USEDEFAULT, CW_USEDEFAULT,
                              guess_width, guess_height,
                              NULL, NULL, inst, NULL);
     }

    /*
     * Initialise the fonts, simultaneously correcting the guesses
     * for font_{width,height}.
     */
    bold_mode = cfg.bold_colour ? BOLD_COLOURS : BOLD_FONT;
    und_mode = UND_FONT;
1148
1149
1150
1151
1152
1153
1154
1155

1156
1157
1158
1159
1160
1161
1162
1149
1150
1151
1152
1153
1154
1155

1156
1157
1158
1159
1160
1161
1162
1163







-
+








		if (filemap)
		    CloseHandle(filemap);
		if (freecl)
		    free(cl);
	    }
	    break;
	  case IDM_RECONF:
          case IDM_RECONF:
	    if (!do_reconfig(hwnd))
		break;
	    just_reconfigged = TRUE;
	    {
		int i;
		for (i=0; i<8; i++)
		    if (fonts[i])
1170
1171
1172
1173
1174
1175
1176
1177

1178
1179
1180
1181










1182
1183
1184
1185
1186
1187
1188
1189
1190
1191

1192
1193
1194

1195




1196
1197
1198
1199

1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220

1221
1222
1223
1224
1225
1226
1227
1171
1172
1173
1174
1175
1176
1177

1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201

1202
1203
1204
1205
1206

1207
1208
1209
1210
1211
1212
1213

1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234

1235
1236
1237
1238
1239
1240
1241
1242







-
+




+
+
+
+
+
+
+
+
+
+









-
+



+
-
+
+
+
+



-
+




















-
+







	    if (cfg.protocol != PROT_TELNET)
	        ldisc = (cfg.ldisc_term ? &ldisc_term : &ldisc_simple);
	    if (pal)
		DeleteObject(pal);
	    logpal = NULL;
	    pal = NULL;
	    cfgtopalette();
	    init_palette();
            init_palette();

	    /* Enable or disable the scroll bar, etc */
	    {
		LONG nflg, flag = GetWindowLong(hwnd, GWL_STYLE);
                LONG nexflag, exflag = GetWindowLong(hwnd, GWL_EXSTYLE);

                nexflag = exflag;
                if (cfg.alwaysontop) {
                    nexflag = WS_EX_TOPMOST;
                    SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE);
                } else {
                    nexflag = 0;
                    SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE);
                }

		nflg = flag;
		if (cfg.scrollbar) nflg |=  WS_VSCROLL;
		else               nflg &= ~WS_VSCROLL;
		if (cfg.locksize) 
		   nflg &= ~(WS_THICKFRAME|WS_MAXIMIZEBOX);
		else              
		   nflg |= (WS_THICKFRAME|WS_MAXIMIZEBOX);

		if (nflg != flag)
                if (nflg != flag || nexflag != exflag)
		{
		    RECT cr, wr;

                    if (nflg != flag) 
		    SetWindowLong(hwnd, GWL_STYLE, nflg);
                        SetWindowLong(hwnd, GWL_STYLE, nflg);
                    if (nexflag != exflag)
                        SetWindowLong(hwnd, GWL_EXSTYLE, nexflag);

		    SendMessage (hwnd, WM_IGNORE_SIZE, 0, 0);
	            SetWindowPos(hwnd, NULL, 0,0,0,0,
		         SWP_NOACTIVATE|SWP_NOCOPYBITS|
			 SWP_NOMOVE|SWP_NOSIZE| SWP_NOZORDER|
                         SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER|
			 SWP_FRAMECHANGED);

		    GetWindowRect (hwnd, &wr);
		    GetClientRect (hwnd, &cr);
		    extra_width = wr.right - wr.left - cr.right + cr.left;
		    extra_height = wr.bottom - wr.top - cr.bottom + cr.top;
		}
	    }

	    term_size(cfg.height, cfg.width, cfg.savelines);
	    InvalidateRect(hwnd, NULL, TRUE);
	    SetWindowPos (hwnd, NULL, 0, 0,
			  extra_width + font_width * cfg.width,
			  extra_height + font_height * cfg.height,
			  SWP_NOACTIVATE | SWP_NOCOPYBITS |
			  SWP_NOMOVE | SWP_NOZORDER);
	    if (IsIconic(hwnd)) {
		SetWindowText (hwnd,
			       cfg.win_name_always ? window_name : icon_name);
	    }
	    break;
            break;
	  case IDM_CLRSB:
	    term_clrsb();
	    break;
	  case IDM_RESET:
	    term_pwron();
	    break;
	  case IDM_TEL_AYT: back->special (TS_AYT); break;