Source

gdt / SpriteEd / ABOUTBOX.CPP

Full commit
/* Code to control the AboutBox */

#include <Owl\OwlAll.H>
#include <StdIO.H>
#pragma hdrstop

#include "SpriteEd.RH" // Resources
#include "AboutBox.H" // That's ours!
#include "SeVer.H" // Version stuff (not VERSIONINFO resource)
//---------------------------------------------------------------------------
TAboutBox::TAboutBox(TWindow* parent, TModule* module)
:
	TSelfCenteringDialog(parent, MAKEINTRESOURCE(IDD_ABOUTBOX), module)
{
	InfoLabel = new TStatic(this, IDC_INFOTEXT);
}
//---------------------------------------------------------------------------
void TAboutBox::CmOk()
{
	SendMessage(WM_CLOSE);
}
//---------------------------------------------------------------------------
void TAboutBox::SetupWindow()
{
	TSelfCenteringDialog::SetupWindow(); // Pass further up the chain to base

   MoveToWindowCentre(Parent->HWindow); // Move to centre of parent
   SetupInfoLabel();
}
//---------------------------------------------------------------------------
void TAboutBox::SetupInfoLabel()
{
	char text[512];
   sprintf(text, "SpriteEditor V%u.%u by David Duncan Ross Palmer, for the use of Sarah Abbott.\nCopyright %u Daybo Logic, all rights reserved.\n\nBuild #%u", SE_VERMAJOR, SE_VERMINOR, SE_CYEAR, SE_BUILD);
	InfoLabel->SetText(text);
}
//---------------------------------------------------------------------------