Studying the interaction of spin-polarized currents with the magnetization configuration is of high interest due to the possible applications and the novel physics involved. High-resolution magnetic imaging is one of the key techniques necessary for a better understanding of these effects. Here, we present an extension to a magnetic microscope that allows for in situ current injection into the structure investigated, and furthermore for the study of current induced magnetization changes during pulsed current injection. The developed setup is highly flexible and can be used for a wide range of investigations. Examples of current-induced domain wall motion and vortex core displacements measured using this setup are presented. (C) 2010 American Institute of Physics. [doi:10.1063/1.3495967]