I have added a menu to WinBoard to set the engine-specific options of UCI engines. The major problem is: how to test it? So I have this request:
Could everyone take his favorite UCI engine, and run it with the aid of the winboard alpha on my website, and Michel van den Bergh's new Polyglot 1.4.33b?
All that is needed is to save the Polyglot in the same folder as the (unzipped) winboard.exe under the name polyglot.exe (so no fancy numbers in the name, or WinBoard would not automatically find it). Then all that is needed is to startup WinBoard through the startup dialog, and type in the first-engine field:
ENGINE.exe /fd=ENGINEFOLDER /fUCI
When you then click the Options -> Engine #1 Settings menu, there should pop up something like:
Could you then play the engine, and somehow figure out if it indeed reacts to changing of the settings you make through this menu? That would be immensely helpful!
Can anyone test this
Moderators: hgm, Rebel, chrisw
-
- Posts: 27855
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
-
- Posts: 853
- Joined: Thu Mar 09, 2006 4:50 pm
- Location: Austria
Re: Can anyone test this
Well, it look a 'bit' different here:hgm wrote: When you then click the Options -> Engine #1 Settings menu, there should pop up something like:
(old notebook, 800x600, Windows 98)
Re: Can anyone test this
Same image here. Windows Me, 800x600F.Huber wrote:Well, it look a 'bit' different here:hgm wrote: When you then click the Options -> Engine #1 Settings menu, there should pop up something like:
(old notebook, 800x600, Windows 98)
-
- Posts: 27855
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Can anyone test this
Oops!
So it does not work under Win 98... I am using the Windows API function DialogBoxIndirect() to pop up the dialog. Does anyone know if there are essential differences between Win 98 and Win2k or XP where I developed it?
Problem is that I hardly know anything about Windows API, and programmed this mainly through trial and error. But trial is a bit difficult on an OS that I do not have. (So only the error remains....)
So it does not work under Win 98... I am using the Windows API function DialogBoxIndirect() to pop up the dialog. Does anyone know if there are essential differences between Win 98 and Win2k or XP where I developed it?
Problem is that I hardly know anything about Windows API, and programmed this mainly through trial and error. But trial is a bit difficult on an OS that I do not have. (So only the error remains....)
Last edited by hgm on Fri Aug 07, 2009 4:03 pm, edited 1 time in total.
-
- Posts: 853
- Joined: Thu Mar 09, 2006 4:50 pm
- Location: Austria
Re: Can anyone test this
I don´t know if this is of any help for you, but here´s the description of this API command for Win98:hgm wrote: I am using the Windows API function DialogBoxIndirect() to pop up the dialog. Does anyone know if there are essential differences between Win 98 and Win2k or XP where I deveoped it?
Code: Select all
The DialogBoxIndirect macro creates a modal dialog box from a dialog box template in memory. DialogBoxIndirect does not return control until the specified callback function terminates the modal dialog box by calling the EndDialog function. The DialogBoxIndirect macro uses the DialogBoxIndirectParam function.
int DialogBoxIndirect(
HINSTANCE hInstance, // handle to application instance
LPDLGTEMPLATE lpTemplate, // identifies dialog box template
HWND hWndParent, // handle to owner window
DLGPROC lpDialogFunc // pointer to dialog box procedure
);
Parameters
hInstance
Identifies the instance of the module that creates the dialog box.
lpTemplate
Pointer to a global memory object containing a template that DialogBoxIndirect uses to create the dialog box. A dialog box template consists of a header that describes the dialog box, followed by one or more additional blocks of data that describe each of the controls in the dialog box. The template can use either the standard format or the extended format.
In a standard template for a dialog box, the header is a DLGTEMPLATE structure followed by additional variable-length arrays. The data for each control consists of a DLGITEMTEMPLATE structure followed by additional variable-length arrays.
In an extended template for a dialog box, the header uses the DLGTEMPLATEEX format and the control definitions use the DLGITEMTEMPLATEEX format.
hWndParent
Identifies the window that owns the dialog box.
lpDialogFunc
Pointer to the dialog box procedure. For more information about the dialog box procedure, see DialogProc.
Return Values
If the function succeeds, the return value is the nResult parameter specified in the call to the EndDialog function that was used to terminate the dialog box.
If the function fails, the return value is -1.
Remarks
The DialogBoxIndirect macro uses the CreateWindowEx function to create the dialog box. DialogBoxIndirect then sends a WM_INITDIALOG message to the dialog box procedure. If the template specifies the DS_SETFONT style, the function also sends a WM_SETFONT message to the dialog box procedure. The function displays the dialog box (regardless of whether the template specifies the WS_VISIBLE style), disables the owner window, and starts its own message loop to retrieve and dispatch messages for the dialog box.
When the dialog box procedure calls the EndDialog function, DialogBoxIndirect destroys the dialog box, ends the message loop, enables the owner window (if previously enabled), and returns the nResult parameter specified by the dialog box procedure when it called EndDialog.
In a standard dialog box template, the DLGTEMPLATE structure and each of the DLGITEMTEMPLATE structures must be aligned on DWORD boundaries. The creation data array that follows a DLGITEMTEMPLATE structure must also be aligned on a DWORD boundary. All of the other variable-length arrays in the template must must be aligned on WORD boundaries.
In an extended dialog box template, the DLGTEMPLATEEX header and each of the DLGITEMTEMPLATEEX control definitions must be aligned on DWORD boundaries. The creation data array, if any, that follows a DLGITEMTEMPLATEEX structure must also be aligned on a DWORD boundary. All of the other variable-length arrays in the template must be aligned on WORD boundaries.
All character strings in the dialog box template, such as titles for the dialog box and buttons, must be Unicode strings. To create code that works on both Windows NT and Windows 95, use the MultiByteToWideChar function to generate these Unicode strings.
Windows 95: The system can support a maximum of 16,364 window handles.
-
- Posts: 27855
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Can anyone test this
What do you get when you open the dialog for Engine #2 Settings before the engine is loaded (so that it should not have any options at all, just an OK and Cancel button)? Is it also messed up then?Charles B. wrote:Same image here. Windows Me, 800x600
Re: Can anyone test this
hgm wrote:What do you get when you open the dialog for Engine #2 Settings before the engine is loaded (so that it should not have any options at all, just an OK and Cancel button)? Is it also messed up then?Charles B. wrote:Same image here. Windows Me, 800x600
note: Hiarcs is loaded as the first chess program.
-
- Posts: 27855
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Can anyone test this
Hmm, it seems to create the two buttons as separate Windows, with their own title bar...
It could be that the format of the discription of how the dialog should look (the 'template') is somehow different in 98/ME, so that the descriptors of the control elements in the dialog are misaligned, and it constructs them from completely different information.
It could be that the format of the discription of how the dialog should look (the 'template') is somehow different in 98/ME, so that the descriptors of the control elements in the dialog are misaligned, and it constructs them from completely different information.
Re: Can anyone test this
Hello,
this is a great feature, or a desperately needed one, from a different point of view, so thanks for it.
I tried loading quite some engines, and it seems to work very well. (first impression only, of course; if all the changes are really accepted I could not test yet.)
some problems:
- Fruit 2.3.1 has too many options, so 3 error reports announcing this have to be clicked away (more candidates with many options would be gambit fruit, some toga versions, but have not tried these now)
- such a window should really be scrollabel, most implementations of uci setting have this problem, with too small a screen (like mine) there is no easy way to get access to all the fields and buttons.
I would not worry too much about Win3.x/95/98; if corrections can be made without too big an effort, ok, but on the other hand these systems are really obsolete, these days (Franz will ... me, but it is nothing personal .
Peter
this is a great feature, or a desperately needed one, from a different point of view, so thanks for it.
I tried loading quite some engines, and it seems to work very well. (first impression only, of course; if all the changes are really accepted I could not test yet.)
some problems:
- Fruit 2.3.1 has too many options, so 3 error reports announcing this have to be clicked away (more candidates with many options would be gambit fruit, some toga versions, but have not tried these now)
- such a window should really be scrollabel, most implementations of uci setting have this problem, with too small a screen (like mine) there is no easy way to get access to all the fields and buttons.
I would not worry too much about Win3.x/95/98; if corrections can be made without too big an effort, ok, but on the other hand these systems are really obsolete, these days (Franz will ... me, but it is nothing personal .
Peter
-
- Posts: 154
- Joined: Thu May 31, 2007 9:05 pm
- Location: Madrid, Spain
Re: Can anyone test this
I tried it under wine with Sungorus 1.2. The first time, the Clear Hash button appears correctly but if I press OK and try again, the button has disappeared.
I then tried with Glaurung 2.2 and I couldn't see the Clear Hash button (not even the first time), although the other options appeared correctly. Also, when I closed it, I got an error (only when I loaded glaurung).
I then tried with Glaurung 2.2 and I couldn't see the Clear Hash button (not even the first time), although the other options appeared correctly. Also, when I closed it, I got an error (only when I loaded glaurung).