@flits: Your example seems to be supposed to just add a menu to the engine window (but st_mode is undefined), but we need a script that creates a subwindow.

Here's my try:
Code:
#include <acknex.h>
#include <windows.h>
#include <default.c>





#define LPWSTR char*
#define MAKEINTRESOURCEW(i) (LPWSTR)((DWORD)((WORD)(i)))
#define MAKEINTRESOURCE MAKEINTRESOURCEW
#define IDI_WINLOGO MAKEINTRESOURCE(32517)


LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);

HWND hwnd1;
STRING* class_name = "YourWindowClass";


void main ()
{
	
	wait(4);
	
	WNDCLASS wc;
	wc.style = CS_HREDRAW | CS_VREDRAW;
	wc.lpfnWndProc = WndProc;
	wc.cbClsExtra = 0;
	wc.cbWndExtra = 0;
	wc.hInstance = 0; // You need to find a way to get the Instance!
	wc.hIcon = LoadIcon (NULL, IDI_WINLOGO);
	wc.hCursor = LoadCursor (NULL, IDC_ARROW);
	wc.hbrBackground = (HBRUSH) GetStockObject (LTGRAY_BRUSH);
	wc.lpszMenuName = NULL;
	wc.lpszClassName = _chr(class_name);
	RegisterClass (&wc);
	
	hwnd1 = CreateWindowEx
	(
	0,
	_chr(class_name),
	_chr("Your Subwindow"),
	(long)(WS_OVERLAPPEDWINDOW | WS_POPUP),
	200, 200, 200, 200,
	(long)hWnd,
	0,
	0, // You need to find a way to get the Instance!
	0
	);

	ShowWindow   (hwnd1, SW_SHOWNORMAL);
	UpdateWindow (hwnd1);
	
	
	while(1) wait(1);
	
	MSG msg;
	while (GetMessage (&msg, NULL, 0, 0))
	{
		TranslateMessage (&msg);
		DispatchMessage (&msg);
		wait(1); // I'm not sure if this is neccessary or helpful
	}
}






LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
	switch (message)
	{
		
		case WM_LBUTTONDOWN:
		MessageBox(0,"Left mouse button pressed inside your subwindow!","!!!",MB_OK);
		return 0; 
		
		default:
		wait(1);
		break;
	}

	return DefWindowProc (hwnd, message, wParam, lParam);
}



So far it doesn't work, it just stops the engine window from responding. This might be because you can't get the instance of the program. So far, I just used 0 as instance, lol. Maybe you can use the SDK to make the engine send you the instance through the command line?