こういうコードは良いんですか?コールバックとか登録してないけど
#include <windows.h>
#include <iostream.h>
#include <fstream.h>

int WINAPI WinMain(HINSTANCE hCurInst, HINSTANCE hPrevInst,
LPSTR lpsCmdLine, int nCmdShow)
{

char buf[512];

// ifstreamのインスタンスを作る
// C言語のfopenと同じ
ifstream ifs( "input.txt" ) ;

// ofstreamのインスタンスを作る
// C言語のfopenと同じ
ofstream ofs( "output.txt" ) ;

// ifstreamのインスタンス(ifs)から1行読み込みbufに入れる。
while( ifs.getline( buf, sizeof(buf) ))
// ofstreamのインスタンス(ofs)を利用して読み込んだ内容を書き込む
ofs << buf << endl;

return 0;
}