I was searching through the Window Properties of a normal Application-Window in Windows. There are winapi functions like:
HWND WINAPI FindWindow(
_In_opt_ LPCTSTR lpClassName,
_In_opt_ LPCTSTR lpWindowName
);
...which return a Window handle if they find a window.
The WindowName is pretty obvious but I don't get the explanation:
The class name or a class atom created by a previous call to the RegisterClass or RegisterClassEx function. The atom must be in the low-order word of lpClassName; the high-order word must be zero.
How can I (for example) set (or register) the class name for a C# Windows Form App so that I can find it via FindWindow
in C++? I sadly cannot use NULL
for the class name because I cannot alter the source program which searches for the class name.