The HM that's given to you just "combines" with the current HM. For example, you have Strength via cheats and you use Rock Smash in Rusturf Tunnel. The guy will give you Strength like he was programmed to.
Hopefully this answers your question
Hope I helped!(ish)