I just started working with asynchronous sockets today and noticed that the WSAAsyncSelect has a parameter of HWND to send events too. I am pretty sure there's a function to get the HWND handle from a ALLEGRO_DISPLAY, but not sure what would happen if I registered that
Does anyone know a way to get asynchronous sockets to emit events to a ALLEGRO_EVENT_QUEUE?
If you use the SVN version of Allegro you can use this after registering the hwnd:
bool net_event(ALLEGRO_DISPLAY *d, UINT msg, WPARAM w, LPARAM l) { if (msg == WM_SOCKET) { // do something return true; } return false; } al_add_win_window_callback(display, net_event);
Cool, could that be used for menus as well?