Category : Files from Magazines
Archive   : DDJ9405F.ZIP
Filename : LABEL.CPP

 
Output of file : LABEL.CPP contained in archive : DDJ9405F.ZIP
// ------------- label.cpp

#include
#include "label.h"

void Label::InitLabel(const String& txt)
{
SetText(String(txt));
int off = txt.FindChar(SHORTCUTCHAR);
if (off != -1)
Control::LatestShortcut = tolower(txt[off+1]);
Disable();
}

Label::Label(const String& txt, int lf, int tp, int wd, DFWindow *par)
: TextBox(lf, tp, 1, wd ? wd : txt.Strlen(), par)
{
InitLabel(txt);
}

Label::Label(const String& txt, int lf, int tp, DFWindow *par)
: TextBox(lf, tp, 1, txt.Strlen(), par)
{
InitLabel(txt);
}

// -------- paint the window
void Label::Paint()
{
if (Parent() != 0)
SetColor(Parent()->Colors());
shortcutfg = RED;
if (isVisible())
WriteShortcutLine(0, ClientFG(), ClientBG());
}






  3 Responses to “Category : Files from Magazines
Archive   : DDJ9405F.ZIP
Filename : LABEL.CPP

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/