We use the cathodoluminescence mode of a scanning electron microscope to investigate the depth and lateral dependencies of the electron-hole pairs generation by the electron beam in Al0.4Ga0.6As semiconducting material. A multiquantum well structure acts as a detector to measure the relative number of generated minority carriers by their radiative recombination, allowing a direct assessment of the generation volume in the sample. In contrast to electron-beam induced current which was used in former studies, the method avoids the effect of carrier diffusion for direct band gap materials. This novel technique can be readily applied to other III-V and II-VI semiconductors. The results may be used for the quantitative interpretation of cathodoluminescence and electron-beam induced current measurements. (C) 1996 American Institute of Physics.