In part 1, I outlined the tools you will need to write a contest module for WriteLog. At this point, the steps needed to set up the wizard have been done. If not, review the WriteLog contest wizard read-me file to install the template, set the Path in the Windows environment, etc.
Look carefully at the rules for the contest you are developing a module for. For this walk-through, I’m using the exchange from the SKCC Weekend Sprint rules, http://www.skccgroup.com/sprint/wes/. The exchange consists of CALL, RST, NAME, SKCC NUMBER, and QTH. The QTH is a once per contest multiplier using States, Provinces, and three character codes for DX (as defined by the United Nations). It’s a simple exchange with some quirks to make it interesting. One interesting thing about SKCC Sprints is the bonus points you get for working Centurians and Tribunes, 5 and 10 points respectively, once for each SKCC number per contest. The SKCC number will end with a C or a T for one of those honored operators.
In VC++, create a new contest project using the WriteLog Contest Wizard. Change the project’s Location to the folder named, “writelog” that was in the contest wizard zip file.
After you click OK, the WriteLog Contest Wizard displays. Select the RST in exchange option, Mults As you go, and Named Mults. Don’t use DXCC because the rules say to use the ISO three letter country designator as the QTH. The multipliers are not ‘By Band’ because you only get to use the multiplier once per contest. Add those to the named multipliers instead of using country data. We’ll be using Mults As you go to keep score of SKCC Centurion and Tribune numbers. Leave the Class name as it is. Fill in the Contest Name and 0 for the GUID. The SKCC contest doesn’t need Cabrillo support but I’m adding it because a lot of contests support this option.
The Generated Code.
After you click the Finish button a pile of code will be generated for you. Add the Dxpref32.lib and wlogsh32.lib to the project Source Files as described in the contest wizard read-me. Now, do Edit|Find in files and search for “TODO.” You should get a list of more than 30 occurrences.
Start with the easy items in the list. Skip down past the resource files (*.rc).
Edit the block of _POS constants. The actual order is not important because these just define their position in an array, not their position in the log or on the screen. Delete or comment out the #error line just above the list of _POS constants.
#define RS_POS 0 //TODO
#define SN_POS (RS_POS + RS_WID)
#define RCVD_POS (SN_POS + SN_WID)
#define MLT_POS (RCVD_POS + RCVD_WID)
#define AYG_POS (MLT_POS + MLT_WID)
#define AYGMULT_POS (AYG_POS + AYG_WID)
More changes will have to be made later but for now the project will compile without errors.
Now that the project will build, go ahead and compile it and do a Tools|Register Control in VC++. Change the Executable for debug session on the Debug tab in the project settings with the path to the main WriteLog program. With that set, we can run the contest module in the debugger and step through the code as WriteLog runs.
At this point in the journey we have built the framework for the contest module, made a few edits, and compiled the code without errors. Now we leave the lowlands and begin to climb.
WriteLog is Copyright © 1992-2009 by Wayne E. Wright, W5XD.
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.