Microscopic studies of static and dynamic contact angles