|MadSci Network: Development|
I believe that you are referring to the phenomenon known as "transdetermination", in which a fly's imaginal cells develop into a complete, but abnormal, organ structure. These changes are generally the result of what are known as "homeotic mutations". Since these "homeobox" genes are essentially master developmental regulatory genes, homeotic mutations would probably be best described as pleiotropic, since developmental reprogramming results in a variety of phenotypic changes. Homeobox genes typically cause these pleiotropic effects by regulating the expression of other developmental genes. But these mutations can also be very complex and some could also be complementary or epistatic in nature. I don't believe that wings can actually be altered to develop specifically as a stomach, however. You might be referring to some of the "bithorax"-type mutations, one of the two major clusters of homeobox genes, in which characteristics of the thorax, such as wings, can be exchanged with those of the abdomen. The other major homeobox gene cluster is known as "Antennapedia" and is responsible for the classic growth of legs in place of antennae.
If you need to find out more, The Interactive Fly from Purdue Univ. explains transdetermination in much greater detail. It's fairly advanced & not particularly easy to sort through, but it's a really up-to-date reference source on this very complex, but vital developmental model.
Thanks for the interesting question,
Try the links in the MadSci Library for more information on Development.