26 static RECT MinimumSize = { -1, -1, -1, -1 };
37 if (uMsg == WM_INITDIALOG)
40 SetProp(hwndDlg, L
"Context", (HANDLE)context);
46 if (uMsg == WM_DESTROY)
64 RemoveProp(hwndDlg, L
"Context");
89 if (MinimumSize.left == -1)
97 MapDialogRect(hwndDlg, &rect);
125 HANDLE dialogThread = INVALID_HANDLE_VALUE;
132 NtClose(dialogThread);
137 HANDLE dialogThread = INVALID_HANDLE_VALUE;
146 NtClose(dialogThread);
154 switch (LOWORD(wParam))
170 case WM_CTLCOLORSTATIC:
172 HDC hDC = (HDC)wParam;
173 HWND hwndChild = (HWND)lParam;
180 SetBkMode(hDC, TRANSPARENT);
186 SetTextColor(hDC, RGB(124, 252, 0));
189 return (INT_PTR)GetStockBrush(BLACK_BRUSH);
195 switch (((LPNMHDR)lParam)->code)
200 PNMLINK syslink = (PNMLINK)lParam;
223 inputString.Buffer = (PCHAR)lParam;
224 inputString.
Length = (USHORT)wParam;
256 SendMessage(context->
OutputHandle, WM_VSCROLL, SB_BOTTOM, 0);
273 inputString.Buffer = (PCHAR)lParam;
274 inputString.
Length = (USHORT)wParam;
283 for (i = 0; i < convertedString.
Length; i++)
285 if (convertedString.Buffer[i] ==
'\n')
310 SendMessage(context->
OutputHandle, WM_VSCROLL, SB_TOP, 0);
339 static NTSTATUS PhNetworkOutputDialogThreadStart(
351 windowHandle = CreateDialogParam(
359 ShowWindow(windowHandle, SW_SHOW);
360 SetForegroundWindow(windowHandle);
362 while (result = GetMessage(&message, NULL, 0, 0))
369 TranslateMessage(&message);
370 DispatchMessage(&message);
377 DestroyWindow(windowHandle);
379 return STATUS_SUCCESS;
387 HANDLE dialogThread = INVALID_HANDLE_VALUE;
395 context->
IpAddress = NetworkItem->RemoteEndpoint.Address;
400 NtClose(dialogThread);
404 if (dialogThread =
PhCreateThread(0, PhNetworkOutputDialogThreadStart, (PVOID)context))
405 NtClose(dialogThread);