string GetActiveWindowTitle() { HWND handle = find_main_window(::getpid()); int bufsize = GetWindowTextLength(handle) + 1; LPWSTR title = new WCHAR[bufsize]; GetWindowText(handle, title, bufsize); return CW2A(title); }
void Resume::CloseVlc() { HWND h = find_main_window(processInfo.dwProcessId); SendMessage(h, WM_CLOSE, NULL, NULL); }