Fix UI for Marcolin

This commit is contained in:
Nicola Carminati
2019-05-08 08:26:51 +02:00
parent 77f5c574b3
commit b8748c81fd
+17 -1
View File
@@ -1013,8 +1013,24 @@ namespace Active_Client.View
if (NcProcessPID != 0 && ActualPID == NcProcessPID)
{
if (state == NcState.SHOW)
SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
{
SetWindowPos(hwnd, ncprocess.MainWindowHandle, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_SHOWWINDOW);
}
//Read the style of the window
ActiveNCWindowStyle = GetWindowLong(hwnd, GWL_STYLE);
//Find if it has the border
ActiveNCWindowBorder = (ActiveNCWindowStyle & WS_BORDER);
//if it has the border and a title execute focus
if (ActiveNCWindowStyle != 0 && ActiveNCWindowBorder == WS_BORDER && ReadWindowTitle(hwnd) != "" && hwnd != ncprocess.MainWindowHandle)
{
SetWindowPos(ncprocess.MainWindowHandle, MainViewHandle, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_SHOWWINDOW);
}
}
//If the PID is the STEP-HMI Process
if (ActualPID == MainProcessPID)