int wb_set_handler (int window, string fn_handler)
For additional information, see <winterpostwiki>Callback functions and window handlers</winterpostwiki>.
$mainwin = wb_create_window(NULL, 100, "", 320, 240);
wb_set_handler($mainwin, "process_main");
// Place other initialization code here
function process_main($window, $id, $ctrl=0, $param1=0, $param2=0)
{
switch($id) {
case ID_ABOUT:
wb_message_box($window, "Test application");
break;
case IDCLOSE:
wb_destroy_window($window);
break;
}
}