Initial
This commit is contained in:
33
guitar/chordmain.cpp
Normal file
33
guitar/chordmain.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#include <common/file.hpp>
|
||||
#include <guitar/GlobalDefs.hpp>
|
||||
|
||||
int PASCAL WinMain(HINSTANCE /*hInstance*/,HINSTANCE /*hPrevInstance*/,LPSTR /*lpszCmdLine*/,int /*nCmdShow*/)
|
||||
{
|
||||
String strLine;
|
||||
String strDef;
|
||||
String strEnum;
|
||||
File inFile("tabs/allchords.tab");
|
||||
File rcFile("chords.rc","wb");
|
||||
File hFile("chords.h","wb");
|
||||
int count(21000);
|
||||
|
||||
rcFile.writeLine("#include <chords.h>");
|
||||
rcFile.writeLine("STRINGTABLE DISCARDABLE");
|
||||
rcFile.writeLine("BEGIN");
|
||||
while(inFile.readLine(strLine))
|
||||
{
|
||||
strEnum="STRING_"+String().fromInt(count);
|
||||
strDef=strEnum;
|
||||
strDef+="\t\"";
|
||||
strDef+=strLine.betweenString(0,':')+"\"";
|
||||
rcFile.writeLine(strDef);
|
||||
hFile.writeLine(String("#define ")+strEnum+String(" ")+String().fromInt(count));
|
||||
count++;
|
||||
}
|
||||
rcFile.writeLine("END");
|
||||
return 0;
|
||||
|
||||
// MainFrame mainFrame;
|
||||
// mainFrame.createWindow("TabMaster","TabMaster v1.00a","mainMenu","APP_ICON");
|
||||
// return mainFrame.messageLoop();
|
||||
}
|
||||
Reference in New Issue
Block a user