You will need to create a GUI Map file. The best way to do this is to use the "GUI Map Editor". Main menu - Tools/GUI Map Editor - then select the "Learn" button.
Also go through the forum Postings, select the download TAB on the QAForums.com "upper right" and select "Mercury or WinRunner". Down load the code and take a look, some of it is good and will help you see how people code in WinRunner.