Author: Ren Wu
Date: 09:49:27 01/29/01
Go up one level in this thread
On January 29, 2001 at 10:32:49, Eran wrote:
>
>I plan to create a new chess program based on MFC in Visual C++ 6 Pro. Though I
>am a beginner, I try to develop both the interface and the chess engine.
Maybe it is better to do the engine first, then user interface, unless you have
same interests on both engine and GUI programming.
>I knew how to put a chessboard picture on a dialog box using picture control in
>the Dialog Editor. Besides, the dialog box could become like an overlapped
>mainframe window. However, I was not sure whether the dialog box was the right
>place to hold the chessboard picture. So, I tried to put it on a frame window
>instead of the dialog box. Unfortunately, I wrestled with the problem of how to
>put the picture on it. Moreover, I could not find a solution in the MSDN Library
>either. Further, I tried the code below but still nothing worked out in my
>programming.
>
>void CMyWinApp::OnFileNew()
>{
> LoadBitmap(AfxGetResourceHandle(), MAKEINTRESOURCE(IDB_CHESSBOARD));
>
> BitBlt(NULL,0,0,450,450,NULL,0,0,SRCCOPY);
>}
>
You need some classes to handle DIBs first, then offscreen DIBs. those buildin
functions will no go anywhere for you.
For a really fancy ones, try to using DirectDraw.
Write a GUI is not a simple task. And note that you can use Winboard, or Chess
master 8000, and many other programs to be the gui, if you write a
winboard/xboard compitible engine.
>If you know how, please inform me. I will appreciate it.
>
>It seems to me that the dialog box is the only place to hold any picture, but I
>am not sure whether I am right. What will you tell me?
There is no free lunch here. you have to manage the drawing/update you window
you self.
Hard to imagimg that a full feature chess program is dialog based, even though
it is surely possible.
>Besides, I am aware that
>Visual C++ is not nice with interface development, but it is excellent with
>chess engine development due to the faster optimizing compiler.
>
Yes, it is a decent complier.
>Furthermore, I do not know for sure whether the MFC is also designed for chess
>software development. Isn't it?
Doc/view is a silly archtecture for chess program. However it is not trival for
a average programmer to break it while still using MFC.
>Anyway, some CCC members told me that it was much better to develop chess engine
>program in the window console. So I could spend more time only on chess engine
>development.
This is right if you are more interested the challenge to create a strong chess
engine. I think most people here are.
Ren
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.