Well, you can't - not just like that anyway. A Windows GUI application is going to deal with things like Windows, Mice, etc. and needs to have event-handling routines. A command-line application needs none of this. You need to write the program with the GUI in mind from the outset.
Of course you can manually convert a command-line program to a GUI one, but it's a question of hand-crafting it. If you can program Windows applications this should be a pretty trivial process for you.