Diff

Differences From Artifact [408c4f81a8]:

To Artifact [4db8f14f3a]:


367
368
369
370
371
372
373
374

375
376
377
378
379
380
381
    }

    {
	int winmode = WS_OVERLAPPEDWINDOW|WS_VSCROLL;
        int exwinmode = 0;
	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);
     }

    /*







|
>







367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
    }

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

    /*
1189
1190
1191
1192
1193
1194
1195

1196
1197
1198
1199
1200
1201
1202
		if (freecl)
		    sfree(cl);
	    }
	    break;
          case IDM_RECONF:
            {
                int prev_alwaysontop = cfg.alwaysontop;

		char oldlogfile[FILENAME_MAX];
		int oldlogtype;
		int need_setwpos = FALSE;
		int old_fwidth, old_fheight;

		strcpy(oldlogfile, cfg.logfilename);
		oldlogtype = cfg.logtype;







>







1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
		if (freecl)
		    sfree(cl);
	    }
	    break;
          case IDM_RECONF:
            {
                int prev_alwaysontop = cfg.alwaysontop;
                int prev_sunken_edge = cfg.sunken_edge;
		char oldlogfile[FILENAME_MAX];
		int oldlogtype;
		int need_setwpos = FALSE;
		int old_fwidth, old_fheight;

		strcpy(oldlogfile, cfg.logfilename);
		oldlogtype = cfg.logtype;
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257




1258
1259
1260
1261
1262
1263
1264
                {
                    LONG nflg, flag = GetWindowLong(hwnd, GWL_STYLE);
                    LONG nexflag, exflag = GetWindowLong(hwnd, GWL_EXSTYLE);

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





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







|



|




>
>
>
>







1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
                {
                    LONG nflg, flag = GetWindowLong(hwnd, GWL_STYLE);
                    LONG nexflag, exflag = GetWindowLong(hwnd, GWL_EXSTYLE);

                    nexflag = exflag;
                    if (cfg.alwaysontop != prev_alwaysontop) {
                        if (cfg.alwaysontop) {
                            nexflag |= WS_EX_TOPMOST;
                            SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0,
                                         SWP_NOMOVE | SWP_NOSIZE);
                        } else {
                            nexflag &= ~(WS_EX_TOPMOST);
                            SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0,
                                         SWP_NOMOVE | SWP_NOSIZE);
                        }
                    }
                    if (cfg.sunken_edge)
                        nexflag |= WS_EX_CLIENTEDGE;
                    else
                        nexflag &= ~(WS_EX_CLIENTEDGE);

                    nflg = flag;
                    if (cfg.scrollbar) nflg |=  WS_VSCROLL;
                    else               nflg &= ~WS_VSCROLL;
                    if (cfg.locksize)
                        nflg &= ~(WS_THICKFRAME|WS_MAXIMIZEBOX);
                    else
1287
1288
1289
1290
1291
1292
1293
1294

1295
1296
1297
1298
1299
1300
1301
                    }
                }

		if (cfg.height != rows ||
		    cfg.width != cols ||
		    old_fwidth != font_width ||
		    old_fheight != font_height ||
		    cfg.savelines != savelines)

		    need_setwpos = TRUE;
                term_size(cfg.height, cfg.width, cfg.savelines);
                InvalidateRect(hwnd, NULL, TRUE);
                if (need_setwpos) {
		    force_normal(hwnd);
		    SetWindowPos (hwnd, NULL, 0, 0,
				  extra_width + font_width * cfg.width,







|
>







1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
                    }
                }

		if (cfg.height != rows ||
		    cfg.width != cols ||
		    old_fwidth != font_width ||
		    old_fheight != font_height ||
		    cfg.savelines != savelines ||
                    cfg.sunken_edge != prev_sunken_edge)
		    need_setwpos = TRUE;
                term_size(cfg.height, cfg.width, cfg.savelines);
                InvalidateRect(hwnd, NULL, TRUE);
                if (need_setwpos) {
		    force_normal(hwnd);
		    SetWindowPos (hwnd, NULL, 0, 0,
				  extra_width + font_width * cfg.width,