Files

39 lines
950 B
C++

#include "LaunchExApp.h"
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
LPCSTR WinName = "Technograd";
void ULaunchExApp::LaunchExternalApplication(FString URLtoOpen)
{
FString Keys = " --kiosk --kiosk-printing --use-system-default-printer --incognito";
FString Args = URLtoOpen + Keys;
FPlatformProcess::CreateProc(TEXT("C:\\Technograd\\Browser\\GoogleChromePortable.exe"), *Args, true, false, false, nullptr, 0, nullptr, nullptr, nullptr);
HWND WinId = FindWindowA(nullptr, WinName);
SetWindowPos(
WinId,
HWND_TOPMOST,
0,
1754,
1080,
166,
SWP_SHOWWINDOW
);
}
void ULaunchExApp::hideBar(bool show)
{
HWND taskbar = FindWindow(_T("Shell_TrayWnd"), NULL);
HWND start = FindWindow(_T("Button"), NULL);
if (taskbar != NULL) {
ShowWindow(taskbar, show ? SW_SHOW : SW_HIDE);
UpdateWindow(taskbar);
}
if (start != NULL) {
// Vista
ShowWindow(start, show ? SW_SHOW : SW_HIDE);
UpdateWindow(start);
}
}