You can control events of nested tab control if you apply a callback function and set WBC_NOTIFY flag:
$maintab = wb_create_control($mainwin, Tabcontrol, "tab1\tab2", 10, 10, 200, 200, ID_MAINTAB);
$innertab = wb_create_control($maintab, Tabcontrol, "tabA\ntabB", 10, 10, 100, 100, ID_INNERTAB, WBC_NOTIFY);
wb_set_handler($innertab, 'process_innertab');
function process_innertab($tabcontrol, $id, $ctrl, $lparam1=0, $lparam2=0) {
// your code goes here
}