on_message

The engine message loop. This function is executed every time a Windows message event is sent to the engine window.

Type

Event

Remarks:

Edition:

A7.20 LC

Example (lite-C):

#include <acknex.h>
#include <windows.h>

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

LRESULT CALLBACK MyMessageHandler(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
   if (WM_SIZE == message)
   { 
       printf("Resize attempt!");
       return 1;
   }
   return OriginalHandler(hwnd,message,wParam,lParam);   	  
}

function main() 
{
   OriginalHandler = on_message;	// store the original message loop
   on_message = MyMessageHandler; // and replace it by your own
   ...
}

See also:

hWnd, hWndTarget

► latest version online