git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25093
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if (length <= 0) return;
wxString player;
if (length <= 0) return;
wxString player;
if (m_config->GetFirstGroup(player, index))
{
list.Add( player );
if (m_config->GetFirstGroup(player, index))
{
list.Add( player );
while (m_config->GetNextGroup(player, index))
{
list.Add( player );
while (m_config->GetNextGroup(player, index))
{
list.Add( player );
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif //precompiled headers
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif //precompiled headers
// My frame constructor
MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size):
// My frame constructor
MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size):
- wxFrame(frame, -1, title, pos, size)
+ wxFrame(frame, -1, title, pos, size, wxDEFAULT_FRAME_STYLE | wxFULL_REPAINT_ON_RESIZE)
{
int i = pages[current_page];
int ch = -1;
{
int i = pages[current_page];
int ch = -1;
int y = 0;
int j;
wxChar *line_ptr;
int y = 0;
int j;
wxChar *line_ptr;
+ int x = (width - xx)/2;
dc->SetFont(* BoldFont);
// Change text to BLACK!
dc->SetFont(* BoldFont);
// Change text to BLACK!
+ int x = (width - xx)/2;
dc->SetFont(* BoldFont);
// Change text to BLACK!
dc->SetFont(* BoldFont);
// Change text to BLACK!
+ int x = (width - xx)/2;
dc->SetTextForeground(* wxBLACK);
dc->DrawText(line_ptr, x, y);
}
dc->SetTextForeground(* wxBLACK);
dc->DrawText(line_ptr, x, y);
}
// randomize();
pages[0] = 0;
// randomize();
pages[0] = 0;
- TheMainWindow = new MainWindow(NULL, 500, _T("wxPoem"), wxPoint(XPos, YPos), wxSize(100, 100), wxCAPTION|wxMINIMIZE_BOX|wxSYSTEM_MENU|wxCLOSE_BOX);
+ TheMainWindow = new MainWindow(NULL,
+ wxID_ANY,
+ _T("wxPoem"),
+ wxPoint(XPos, YPos),
+ wxSize(100, 100),
+ wxCAPTION|wxMINIMIZE_BOX|wxSYSTEM_MENU|wxCLOSE_BOX|wxFULL_REPAINT_ON_RESIZE
+ );
#ifdef wx_x
TheMainWindow->SetIcon(Icon(_T("wxpoem")));
#ifdef wx_x
TheMainWindow->SetIcon(Icon(_T("wxpoem")));
long data;
FILE *index_file;
long data;
FILE *index_file;
wxChar buf[100];
if (file_name == NULL)
wxChar buf[100];
if (file_name == NULL)
wxFscanf(index_file, _T("%ld"), &nitems);
wxFscanf(index_file, _T("%ld"), &nitems);
- for (i = 0; i < nitems; i++)
+ for (int i = 0; i < nitems; i++)
{
wxFscanf(index_file, _T("%ld"), &data);
poem_index[i] = data;
{
wxFscanf(index_file, _T("%ld"), &data);
poem_index[i] = data;
// Get index
int GetIndex()
{
// Get index
int GetIndex()
{
- int indexn = 0;
-
- indexn = (int)(rand() % nitems);
+ int indexn = (int)(rand() % nitems);
if ((indexn < 0) || (indexn > nitems))
{ PoetryError(_T("No such poem!"));
if ((indexn < 0) || (indexn > nitems))
{ PoetryError(_T("No such poem!"));
// file, otherwise use index[index_ptr] to find the correct position.
bool LoadPoem(wxChar *file_name, long position)
{
// file, otherwise use index[index_ptr] to find the correct position.
bool LoadPoem(wxChar *file_name, long position)
{
- int ch = 0;
- int i = 0;
// int j = 0;
// int indexn = 0;
wxChar buf[100];
// int j = 0;
// int indexn = 0;
wxChar buf[100];
fseek(data_file, data, SEEK_SET);
fseek(data_file, data, SEEK_SET);
+ int ch = 0;
+ int i = 0;
while ((ch != EOF) && (ch != '#'))
{
ch = getc(data_file);
while ((ch != EOF) && (ch != '#'))
{
ch = getc(data_file);
bool Compile(void)
{
FILE *file;
bool Compile(void)
{
FILE *file;
wxChar buf[100];
if (data_filename)
wxChar buf[100];
if (data_filename)
if (ch == '#')
{
ch = getc(file);
if (ch == '#')
{
ch = getc(file);
poem_index[nitems] = data;
nitems ++;
}
poem_index[nitems] = data;
nitems ++;
}
fclose(file);
if (index_filename)
fclose(file);
if (index_filename)