We have investigated theoretically the influence on transverse optical modes of a two-dimensional photonic crystal (PC) defect waveguide embedded into a vertical-cavity surface-emitting laser. In gain-guided structures, where the index profile is weak, the effect of the PC is efficient. In the oxide-confined structures, where the index guidance provided by the oxide is larger, this is not the case, but the efficiency of the PC can be increased by oxide in the node position. It is shown that the thermal lensing effect leads to increased sensitivity of the single-mode conditions on the current injection change.