TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: ANTHONY TIBBS
from: KURT KUZBA
date: 1997-12-27 13:05:00
subject: Windowing 2/5

/*_|_|   begin   WINDERS.CPP   (part 2 of 5)                       **
_|_|_|   PUBLIC DOMAIN   by Kurt Kuzba   12/25/1997                **
_|_|_|   A simple example of using windowed text in Borland C++.   **
_|_|_|   No warrantees or guarantees given or implied.             **
_|_|*/
//   define basic window class, derived from MyWindows   ************
class BasicWindow : public MyWindows{
public:
   void Create(WIN_DEF);
   void Create(int, int, int, int, int);
};
//**********   BasicWindow functions
void BasicWindow::Create(int l = 1, int t = 1, int r = WIDE,
   int b = HIGH, int a = 0x1f)
{
   WIN_DEF wd = { l, t, r, b, a, 0 };
   Create(wd);
}
void BasicWindow::Create(WIN_DEF wd)
{
   if(psBuffer)
      return;
   wd1.nL = (wd.nL  WIDE) ? 1 : wd.nL;
   wd1.nR = (wd.nR  WIDE) ? WIDE : wd.nR;
   wd1.nT = (wd.nT  HIGH) ? 1 : wd.nT;
   wd1.nB = (wd.nB  HIGH) ? HIGH : wd.nB;
   wd1.nA = wd.nA;
   wd2 = wd1;
   Grab();
   clrscr();
   _wscroll = 1;
}
/*_|_|   end   WINDERS.CPP   (part 2 of 5)                         */
> ] If you traded Pride for Common Sense you got a great deal...
---
---------------
* Origin: *YOPS ]I[* 3.1 GIG * RA/FD/FE RADist * Milwaukee, WI (1:154/750)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.