you=ptr_for_handle(handle_var);

You is an ENTITY* pointer. Entities and panels are different things and can not be assigned to each other in the code.