Author: Daniel Mehrmannn
Date: 18:54:10 10/25/04
There is no trick or secret.
Lets take a look to my engine and how it works.
I created a file called windows.c:
/*
ChessProgram Homer by Daniel Mehrmann
Copyright Daniel Mehrmann 2003, 2004
*/
#ifdef WIN32
#include <windows.h>
#include "homer.h"
#include "protos.h"
void
WindowsMessageHandle(char *message) {
MessageBox(NULL, message, "Homer " VERSION " build "BUILD, MB_OK);
}
#endif
The call could be like this:
void
CreateSettingFile()
{
if ((RC_FILE = fopen("homer.ini", "w")) == NULL) {
#ifdef WIN32
WindowsMessageHandle("Homer can't create homer.ini");
#else
MessageHandle("Can't create homer.ini", 1);
#endif
[....]
Now you have a nice windows dialog box with a "ok" button and your text.
Hope that helps
Daniel
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.