ButtonMatrix not working in Visual Studio PC simulator

Hi Folks,

I was able to run the Button Widget example in the PC simulator using Visual Studio. But when I try and run the Button Matrix example I get an error that I can’t seem to fix.

static void event_handler(lv_event_t * e)
lv_event_code_t code = lv_event_get_code(e);
lv_obj_t * obj = lv_event_get_target(e); <-------Error here
uint32_t id = lv_btnmatrix_get_selected_btn(obj);
const char * txt = lv_btnmatrix_get_btn_text(obj, id);
LV_LOG_USER(“%s was pressed\n”, txt);

The error message is: "EO144 A value of type “void” cannot be used to initialize an entity of type “lv_obj_t”

How can I fix this?

Thanks, Richard