I have Epic Editor which returns a handle to the window (see Java code from plugin_1 below):
int handle = com.arbortext.epic.Application.getActiveWindow().getNativeHandle();
In fact, this handle is CWnd *
pointer. Its direct transfer to the native plugin_2 does not work. Instead, we have to use dll with MFC support with the call
HWND __stdcall GetHandle(CWnd *cp)
{
HWND hWnd = cp->GetSafeHwnd();
return hWnd;
}
How can I rewrite this code in Delphi without MFC? I mean the extraction of window handle from the pointer to the CWnd
object.