#include <windows.h> <!--more-->
HWND hwnd = FindWindow(NULL, "Typora"); RECT rect; GetWindowRect(hwnd, &rect); auto rect_to_vec2 = ImVec2((rect.left + rect.right) / 2.0f, (rect.top + rect.bottom) / 2.0f);
ImGui::SetNextWindowPos(rect_to_vec2, ImGuiCond_Always);
ImGui::Begin("Window Title");
ImGui::End();
|