Move the win32 window class name to a constant

This commit is contained in:
Robbert van der Helm
2021-07-26 13:51:40 +02:00
parent d522e57a8a
commit 0523a06ed7
+7 -1
View File
@@ -40,6 +40,12 @@ using namespace std::literals::string_literals;
} \
} while (0)
/**
* The name of the Win32 window class we'll use for the Win32 window that the
* plugin can embed itself in.
*/
constexpr char window_class_name[] = "yabridge plugin";
/**
* The Win32 timer ID we'll use to periodically call the VST2 `effeditidle`
* function with. We have to do this on a timer because the function has to be
@@ -1231,7 +1237,7 @@ ATOM get_window_class() noexcept {
window_class.lpfnWndProc = window_proc;
window_class.hInstance = GetModuleHandle(nullptr);
window_class.hCursor = arrow_cursor;
window_class.lpszClassName = "yabridge plugin";
window_class.lpszClassName = window_class_name;
window_class_handle = RegisterClassEx(&window_class);
}