+int AxWin3_int_DefaultMessageHandler(tWindow *Win, int ID, size_t Len, const void *Data)
+{
+ switch(ID)
+ {
+ case WNDMSG_HOTKEY: {
+ const struct sWndMsg_Hotkey *mi = Data;
+ if( Len < sizeof(*mi) )
+ return -1;
+
+ if( mi->ID >= MAX_HOTKEYS )
+ _SysDebug("--- Out of range hotkey %i fired", mi->ID);
+ else if( gAxWin3_Hotkeys[mi->ID] == 0 )
+ _SysDebug("--- Unmapped hotkey ID %i fired", mi->ID);
+ else
+ gAxWin3_Hotkeys[mi->ID]();
+ }
+ return 1;
+ // Honour a close message by default
+ case WNDMSG_CLOSE:
+ AxWin3_DestroyWindow(Win);
+ return 1;
+ // Zero fucks given?
+ case WNDMSG_DESTROY:
+ _SysDebug("TODO: Check that WNDMSG_DESTROY was from us calling _DestroyWindow");
+ // TODO: Finalise cleanup of window, this will be the last message sent to this window
+ return 1;
+ default:
+ return 0;
+ }
+}
+