|
|
|
@ -1326,9 +1326,17 @@ static LRESULT CALLBACK ActionResultWndProc(HWND hWnd, UINT message, WPARAM wPar |
|
|
|
HWND hEdit = CreateWindowExA(WS_EX_CLIENTEDGE, "EDIT", "", |
|
|
|
HWND hEdit = CreateWindowExA(WS_EX_CLIENTEDGE, "EDIT", "", |
|
|
|
WS_CHILD | WS_VISIBLE | ES_MULTILINE | ES_READONLY | WS_VSCROLL | ES_AUTOVSCROLL, |
|
|
|
WS_CHILD | WS_VISIBLE | ES_MULTILINE | ES_READONLY | WS_VSCROLL | ES_AUTOVSCROLL, |
|
|
|
0, 0, 0, 0, hWnd, (HMENU)1, ((CREATESTRUCTA*)lParam)->hInstance, NULL); |
|
|
|
0, 0, 0, 0, hWnd, (HMENU)1, ((CREATESTRUCTA*)lParam)->hInstance, NULL); |
|
|
|
HFONT hFont = (HFONT)GetStockObject(ANSI_FIXED_FONT); |
|
|
|
HDC hdc = GetDC(hWnd); |
|
|
|
|
|
|
|
int logpix = GetDeviceCaps(hdc, LOGPIXELSY); |
|
|
|
|
|
|
|
ReleaseDC(hWnd, hdc); |
|
|
|
|
|
|
|
HFONT hFont = CreateFontA(-MulDiv(10, logpix, 72), |
|
|
|
|
|
|
|
0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, |
|
|
|
|
|
|
|
DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, |
|
|
|
|
|
|
|
CLEARTYPE_QUALITY, FIXED_PITCH | FF_MODERN, |
|
|
|
|
|
|
|
"Consolas"); |
|
|
|
SendMessage(hEdit, WM_SETFONT, (WPARAM)hFont, TRUE); |
|
|
|
SendMessage(hEdit, WM_SETFONT, (WPARAM)hFont, TRUE); |
|
|
|
SetWindowLongPtrA(hWnd, GWLP_USERDATA, (LONG_PTR)hEdit); |
|
|
|
SetWindowLongPtrA(hWnd, GWLP_USERDATA, (LONG_PTR)hEdit); |
|
|
|
|
|
|
|
SetPropA(hWnd, "Font", (HANDLE)hFont); |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
case WM_SIZE: |
|
|
|
case WM_SIZE: |
|
|
|
@ -1338,6 +1346,12 @@ static LRESULT CALLBACK ActionResultWndProc(HWND hWnd, UINT message, WPARAM wPar |
|
|
|
case WM_CLOSE: |
|
|
|
case WM_CLOSE: |
|
|
|
ShowWindow(hWnd, SW_HIDE); |
|
|
|
ShowWindow(hWnd, SW_HIDE); |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
|
|
|
|
case WM_DESTROY: { |
|
|
|
|
|
|
|
HFONT hFont = (HFONT)GetPropA(hWnd, "Font"); |
|
|
|
|
|
|
|
if (hFont) DeleteObject(hFont); |
|
|
|
|
|
|
|
RemovePropA(hWnd, "Font"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
default: |
|
|
|
default: |
|
|
|
return DefWindowProcA(hWnd, message, wParam, lParam); |
|
|
|
return DefWindowProcA(hWnd, message, wParam, lParam); |
|
|
|
} |
|
|
|
} |
|
|
|
|