<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Konstruktor fehler]]></title><description><![CDATA[<p>Hallo, ich vermute das ich einen Fehler im Konstruktor für Schalter habe. Leider finde ich ihn nicht mit der Fehlerausgabe kann ich leider nichts anfangen da mir der Compiler nur &quot;Debug Assertion failed&quot; sagt. Vllt. sieht ihn einer von euch.</p>
<p>Schalter.h</p>
<pre><code class="language-cpp">#ifndef _Schalter_
#define _Schalter_

#include &quot;TextBox.h&quot;

class Schalter
{
	private:

	int nX, nY;
	int fEin;
	TextBox *pTxEin, *pTxAus, *pTxZust;

	public:

	int GetX();
	int GetY();
	int GetZust(); 
	void SetX(int X);
	void SetY(int Y);
	void SetZust(int Zust);
	Schalter();
	Schalter(char *Ein, char *Aus, int X, int Y);
	Schalter(const Schalter &amp;s);
	~Schalter();
	void Set(const Schalter &amp;s);
	void Show();

};
#endif
</code></pre>
<p>TextBox.h</p>
<pre><code class="language-cpp">#ifndef _TextBox_
#define _TextBox_

class TextBox
{

private:
	int nX, nY;
	int nW, nH;
	char *szText;

public:

	int GetX() const;
	int GetY() const; 
	int GetW() const; 
	int GetH() const; 
	const char * GetText() const;
	void SetX(int X); 
	void SetY(int Y); 
	void SetW(int W); 
	void SetH(int H);
	void SetText(char *Text);
	TextBox(char *Text, int X, int Y, int W, int H);
	TextBox(const TextBox &amp;t);
	~TextBox();
	void Show();
	int Contains(int nX, int nY);
};

#endif
</code></pre>
<p>Windows.h</p>
<pre><code class="language-cpp">#ifndef __WINADAPT
#define __WINADAPT
#include &quot;windows.h&quot;

extern void Line(int xa, int ya, int xe, int ye);
extern void Text(int xa, int ya, char txt[]);
extern void Rect(int xa, int ya, int xe, int ye);
extern void Elli(int xa, int ya, int xe, int ye);
extern void LineCol(int r, int g, int b);
extern void FillCol(int r, int g, int b);
extern void PutPixel(int xa, int ya, COLORREF crColora);
extern void FillPoly(int *lpPoint, int nPoints);
#endif
</code></pre>
<p>Schalter.cpp</p>
<pre><code class="language-cpp">#include &quot;TextBox.h&quot;
#include &quot;Schalter.h&quot;
#include &quot;Winadapt.h&quot;

#define Abstand 30

int Schalter::GetX()

{	return Schalter::nX;	}

int Schalter::GetY() 

{	return Schalter::nY;	}

int Schalter::GetZust() 

{	return Schalter::fEin;	}

void Schalter::SetX(int X) 
{
	nX = X;
	pTxEin-&gt;SetX(X);
	pTxAus-&gt;SetX(X+Abstand);
	pTxZust-&gt;SetX(X+2*Abstand);
}

void Schalter::SetY(int Y) 
{
	nY =Y;
	pTxEin-&gt;SetY(Y);
	pTxAus-&gt;SetY(Y);
	pTxZust-&gt;SetY(Y);
}

void Schalter::SetZust(int Zust) 
{
	Schalter::fEin = Zust;
	if(Zust == 1) pTxZust-&gt;SetText(&quot;1&quot;);
	pTxZust-&gt;SetText(&quot;0&quot;);
}

Schalter::Schalter() 
{
	nX = 0;
	nY = 0;
	fEin = 0;
}

Schalter::Schalter(char *Ein, char *Aus, int X, int Y) 
{	
	nX = X;
	nY = Y;
	pTxEin = new TextBox(&quot;Ein&quot;, X, Y, Abstand, Abstand);
	pTxAus = new TextBox(&quot;Aus&quot;, X+Abstand, Y, Abstand, Abstand);
	pTxZust = new TextBox(&quot;&quot;, X+2*Abstand, Y, Abstand, Abstand);
	SetZust(0);

}

Schalter::Schalter(const Schalter &amp;s) 
{
	pTxEin = new TextBox (*s. pTxEin );
	pTxAus = new TextBox (*s. pTxAus );
	pTxZust = new TextBox (*s. pTxZust );
}

Schalter::~Schalter() 
{
	delete[] pTxEin;
	delete[] pTxAus;
	delete[] pTxZust;
}

void Schalter::Set(const Schalter &amp;s) 
{
	delete[] pTxEin;
	delete[] pTxAus;
	delete[] pTxZust;

	pTxEin = new TextBox (*s. pTxEin );
	pTxAus = new TextBox (*s. pTxAus );
	pTxZust = new TextBox (*s. pTxZust );

}

void Schalter::Show() 
{
	pTxEin-&gt;Show();
	pTxAus-&gt;Show();
	pTxZust-&gt;Show();

}
</code></pre>
<p>TextBox.cpp</p>
<pre><code class="language-cpp">#include &quot;TextBox.h&quot;
#include &lt;string&gt;
#include &quot;Winadapt.h&quot;

int TextBox::GetX() const
	{
		return nX;
	}

int TextBox::GetY() const
	{
		return nY;
	}

int TextBox::GetW() const
	{
		return nW;
	}

int TextBox::GetH() const
	{
		return nH;
	}

const char *TextBox::GetText() const
	{
		return szText;
	}

void TextBox::SetX(int X)
	{
		TextBox::nX = X;
	}

void TextBox::SetY(int Y)
	{	
		nY =Y;
	}

void TextBox::SetW(int W)
	{
		nW = W;
	}

void TextBox::SetH(int H)
	{
		nH = H;
	}

void TextBox::SetText(char *Text)
{
	szText = new char[strlen(Text) + 1];
	strcpy(szText, Text);
}

TextBox::TextBox(char *Text, int X, int Y, int W, int H)
{
	szText = new char[strlen(Text) + 1];
	strcpy(szText, Text);
	nX = X;
	nY = Y;
	nW = W;
	nH = H;

}
TextBox::TextBox(const TextBox &amp;t)
{
	SetText(t.szText);
	SetX(t.nX);
	SetY(t.nY);
	SetW(t.nW);
	SetH(t.nH);

}
TextBox::~TextBox()
{
	delete[] szText;
}
void TextBox::Show()
{
	Rect(nX,nY,(nX+nW),(nY+nH));
	Text(nX+10, nY+8, szText);

}
int TextBox::Contains(int nX, int nY)
{	if(nX &gt;= TextBox::nX &amp;&amp; nX &lt;= TextBox::nX + TextBox::nW 
	   &amp;&amp; nY &gt;= TextBox::nY &amp;&amp; nY &lt;= TextBox::nY + TextBox::nH)
	{return 1;}
}
</code></pre>
<p>Winadapt.cpp</p>
<pre><code class="language-cpp">#include &lt;stdlib.h&gt;
#include &lt;stdio.h&gt;
#include &lt;string.h&gt;
#include &quot;WinAdapt.h&quot;
#include &quot;TextBox.h&quot;
#include &quot;Schalter.h&quot;

//TextBox t(&quot; Test &quot; ,100 ,100 ,60 ,30);
Schalter s(&quot;On&quot;,&quot;Off&quot; ,100 ,100);

void VtlZyk(void)
{
}

void VtlMouse(int X, int Y)
{ 
}

void VtlKeyHit(int key)
{
}

void VtlInit(void)
{ 
}

void VtlPaint(int xl, int yo, int xr, int yu)
{
	//t. Show (); // 2. Test Show () / Konstruktor
	//TextBox tt(t); // 3. Test Copykonstruktor
	//tt. Show ();
}
</code></pre>
<p>winadapt.cpp</p>
<pre><code class="language-cpp">/*
   Windows- Adapter- Programm
   PIN3 SS99
   Kn/Bö
   DIESE DATEI SOLL NICHT GEAENDERT WERDEN
*/

#include &lt;windows.h&gt;
#include &lt;string.h&gt;
#include &quot;WinAdapt.h&quot;

#define SIMPROTIMER 4711
#define UPDINTERVALL 200  //msec. zwischen updates

HDC Ghdc;

extern void VtlPaint(int, int, int, int);
extern void VtlZyk(void);
extern void VtlMouse(int X, int Y);
extern void VtlKeyHit(int key);
extern void VtlInit(void);

LRESULT CALLBACK WndProc (HWND, UINT, UINT, LONG) ;
void Loop();

HPEN hpNewPen=0;
HBRUSH hbNewBrush=0;

int CALLBACK WinMain(
    IN HINSTANCE hInstance,
    IN HINSTANCE hPrevInstance,
    IN LPSTR lpCmdLine,
    IN int nShowCmd
    )
{ static char szAppName[] = &quot;HelloWin&quot; ;
  HWND        hwnd ;
  MSG         msg ;
  WNDCLASS    wndclass ;
  if (!hPrevInstance)
  { wndclass.style         = CS_HREDRAW | CS_VREDRAW ;
    wndclass.lpfnWndProc   = WndProc ;
    wndclass.cbClsExtra    = 0 ;
    wndclass.cbWndExtra    = 0 ;
    wndclass.hInstance     = (HINSTANCE)hInstance ;
    wndclass.hIcon         = LoadIcon(NULL,IDI_APPLICATION);
    wndclass.hCursor       = LoadCursor(NULL,IDC_ARROW);
    wndclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
    wndclass.lpszMenuName  = NULL ;
    wndclass.lpszClassName = szAppName ;
    RegisterClass (&amp;wndclass) ; }
   hwnd = CreateWindow (szAppName,        //Fenst.klassenname
                              &quot;Anwendungsfenster&quot;, //Titelleiste
                    WS_OVERLAPPEDWINDOW, //Fensterstil
                    CW_USEDEFAULT,       //Fensterpos, x
                              CW_USEDEFAULT,       //Fensterpos, y
                              CW_USEDEFAULT,       //horizontale Groesse
                              CW_USEDEFAULT,       //vertikale   Groesse
                              NULL,                //Parent Window
                              NULL,                //Handle Menue
                              (HINSTANCE)hInstance,           //Handle Instanz
                    NULL) ;              //Spezialparameter
  ShowWindow (hwnd, nShowCmd) ;
  UpdateWindow (hwnd) ;
  while (GetMessage (&amp;msg, NULL, 0, 0))
          { TranslateMessage (&amp;msg) ;
            DispatchMessage (&amp;msg) ; }
  return msg.wParam ;
}
LRESULT CALLBACK WndProc  (HWND hwnd, UINT message,
                                 UINT wParam, LONG lParam)
{ PAINTSTRUCT ps; RECT rect;
  switch (message)
  { case WM_CREATE :
      VtlInit();
      SetTimer(hwnd, SIMPROTIMER, UPDINTERVALL, NULL);
      return 0;
    case WM_TIMER :
      if (wParam == SIMPROTIMER){
        VtlZyk();
        InvalidateRect(hwnd, NULL, TRUE);
      }
      return 0;
    case WM_PAINT :
      Ghdc = BeginPaint (hwnd, &amp;ps) ;
      GetClientRect (hwnd, &amp;rect) ;
      VtlPaint(rect.left, rect.top, rect.right, rect.bottom);
      EndPaint (hwnd, &amp;ps) ;
      return 0 ;
    case WM_LBUTTONUP :
      VtlMouse(LOWORD(lParam), HIWORD(lParam));
      return 0;
      case WM_CHAR :
        VtlKeyHit(wParam);
        return 0;
    case WM_DESTROY : PostQuitMessage (0) ; return 0 ;
  }
  return DefWindowProc (hwnd, message, wParam, lParam) ;
}

void Text(int xa, int ya, char txt[])
{ TextOut(Ghdc, xa, ya, txt, strlen(txt)); }

void Line(int xa, int ya, int xe, int ye)
{ MoveToEx(Ghdc, xa, ya, NULL); LineTo(Ghdc, xe, ye); }

void Rect(int xa, int ya, int xe, int ye)
{ Rectangle(Ghdc, xa, ya, xe, ye); }

void Elli(int xa, int ya, int xe, int ye)
{ Ellipse(Ghdc, xa, ya, xe, ye); }

void LineCol(int r, int g, int b)
{  HPEN hp=hpNewPen;
   hpNewPen=CreatePen(PS_SOLID, 1, RGB(r,g,b));
   SelectObject(Ghdc, hpNewPen);
   if (hp)DeleteObject(hp);
}

void FillCol(int r, int g, int b)
{  HBRUSH hb=hbNewBrush;
   hbNewBrush=CreateSolidBrush(RGB(r,g,b));
   //hbNewBrush=CreateHatchBrush(HS_BDIAGONAL, RGB(r,g,b));
   SelectObject(Ghdc, hbNewBrush);
   if (hb)DeleteObject(hb);
}

void PutPixel(int xa, int ya, COLORREF crColora)
{ SetPixel(Ghdc, xa, ya, crColora); }

void FillPoly(int* lpPoint, int nPoints)
{ int fResult=Polygon(Ghdc, (LPPOINT)lpPoint, nPoints); }
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/214894/konstruktor-fehler</link><generator>RSS for Node</generator><lastBuildDate>Tue, 13 Oct 2026 02:22:01 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/214894.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 04 Jun 2008 11:19:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Konstruktor fehler on Wed, 04 Jun 2008 11:19:12 GMT]]></title><description><![CDATA[<p>Hallo, ich vermute das ich einen Fehler im Konstruktor für Schalter habe. Leider finde ich ihn nicht mit der Fehlerausgabe kann ich leider nichts anfangen da mir der Compiler nur &quot;Debug Assertion failed&quot; sagt. Vllt. sieht ihn einer von euch.</p>
<p>Schalter.h</p>
<pre><code class="language-cpp">#ifndef _Schalter_
#define _Schalter_

#include &quot;TextBox.h&quot;

class Schalter
{
	private:

	int nX, nY;
	int fEin;
	TextBox *pTxEin, *pTxAus, *pTxZust;

	public:

	int GetX();
	int GetY();
	int GetZust(); 
	void SetX(int X);
	void SetY(int Y);
	void SetZust(int Zust);
	Schalter();
	Schalter(char *Ein, char *Aus, int X, int Y);
	Schalter(const Schalter &amp;s);
	~Schalter();
	void Set(const Schalter &amp;s);
	void Show();

};
#endif
</code></pre>
<p>TextBox.h</p>
<pre><code class="language-cpp">#ifndef _TextBox_
#define _TextBox_

class TextBox
{

private:
	int nX, nY;
	int nW, nH;
	char *szText;

public:

	int GetX() const;
	int GetY() const; 
	int GetW() const; 
	int GetH() const; 
	const char * GetText() const;
	void SetX(int X); 
	void SetY(int Y); 
	void SetW(int W); 
	void SetH(int H);
	void SetText(char *Text);
	TextBox(char *Text, int X, int Y, int W, int H);
	TextBox(const TextBox &amp;t);
	~TextBox();
	void Show();
	int Contains(int nX, int nY);
};

#endif
</code></pre>
<p>Windows.h</p>
<pre><code class="language-cpp">#ifndef __WINADAPT
#define __WINADAPT
#include &quot;windows.h&quot;

extern void Line(int xa, int ya, int xe, int ye);
extern void Text(int xa, int ya, char txt[]);
extern void Rect(int xa, int ya, int xe, int ye);
extern void Elli(int xa, int ya, int xe, int ye);
extern void LineCol(int r, int g, int b);
extern void FillCol(int r, int g, int b);
extern void PutPixel(int xa, int ya, COLORREF crColora);
extern void FillPoly(int *lpPoint, int nPoints);
#endif
</code></pre>
<p>Schalter.cpp</p>
<pre><code class="language-cpp">#include &quot;TextBox.h&quot;
#include &quot;Schalter.h&quot;
#include &quot;Winadapt.h&quot;

#define Abstand 30

int Schalter::GetX()

{	return Schalter::nX;	}

int Schalter::GetY() 

{	return Schalter::nY;	}

int Schalter::GetZust() 

{	return Schalter::fEin;	}

void Schalter::SetX(int X) 
{
	nX = X;
	pTxEin-&gt;SetX(X);
	pTxAus-&gt;SetX(X+Abstand);
	pTxZust-&gt;SetX(X+2*Abstand);
}

void Schalter::SetY(int Y) 
{
	nY =Y;
	pTxEin-&gt;SetY(Y);
	pTxAus-&gt;SetY(Y);
	pTxZust-&gt;SetY(Y);
}

void Schalter::SetZust(int Zust) 
{
	Schalter::fEin = Zust;
	if(Zust == 1) pTxZust-&gt;SetText(&quot;1&quot;);
	pTxZust-&gt;SetText(&quot;0&quot;);
}

Schalter::Schalter() 
{
	nX = 0;
	nY = 0;
	fEin = 0;
}

Schalter::Schalter(char *Ein, char *Aus, int X, int Y) 
{	
	nX = X;
	nY = Y;
	pTxEin = new TextBox(&quot;Ein&quot;, X, Y, Abstand, Abstand);
	pTxAus = new TextBox(&quot;Aus&quot;, X+Abstand, Y, Abstand, Abstand);
	pTxZust = new TextBox(&quot;&quot;, X+2*Abstand, Y, Abstand, Abstand);
	SetZust(0);

}

Schalter::Schalter(const Schalter &amp;s) 
{
	pTxEin = new TextBox (*s. pTxEin );
	pTxAus = new TextBox (*s. pTxAus );
	pTxZust = new TextBox (*s. pTxZust );
}

Schalter::~Schalter() 
{
	delete[] pTxEin;
	delete[] pTxAus;
	delete[] pTxZust;
}

void Schalter::Set(const Schalter &amp;s) 
{
	delete[] pTxEin;
	delete[] pTxAus;
	delete[] pTxZust;

	pTxEin = new TextBox (*s. pTxEin );
	pTxAus = new TextBox (*s. pTxAus );
	pTxZust = new TextBox (*s. pTxZust );

}

void Schalter::Show() 
{
	pTxEin-&gt;Show();
	pTxAus-&gt;Show();
	pTxZust-&gt;Show();

}
</code></pre>
<p>TextBox.cpp</p>
<pre><code class="language-cpp">#include &quot;TextBox.h&quot;
#include &lt;string&gt;
#include &quot;Winadapt.h&quot;

int TextBox::GetX() const
	{
		return nX;
	}

int TextBox::GetY() const
	{
		return nY;
	}

int TextBox::GetW() const
	{
		return nW;
	}

int TextBox::GetH() const
	{
		return nH;
	}

const char *TextBox::GetText() const
	{
		return szText;
	}

void TextBox::SetX(int X)
	{
		TextBox::nX = X;
	}

void TextBox::SetY(int Y)
	{	
		nY =Y;
	}

void TextBox::SetW(int W)
	{
		nW = W;
	}

void TextBox::SetH(int H)
	{
		nH = H;
	}

void TextBox::SetText(char *Text)
{
	szText = new char[strlen(Text) + 1];
	strcpy(szText, Text);
}

TextBox::TextBox(char *Text, int X, int Y, int W, int H)
{
	szText = new char[strlen(Text) + 1];
	strcpy(szText, Text);
	nX = X;
	nY = Y;
	nW = W;
	nH = H;

}
TextBox::TextBox(const TextBox &amp;t)
{
	SetText(t.szText);
	SetX(t.nX);
	SetY(t.nY);
	SetW(t.nW);
	SetH(t.nH);

}
TextBox::~TextBox()
{
	delete[] szText;
}
void TextBox::Show()
{
	Rect(nX,nY,(nX+nW),(nY+nH));
	Text(nX+10, nY+8, szText);

}
int TextBox::Contains(int nX, int nY)
{	if(nX &gt;= TextBox::nX &amp;&amp; nX &lt;= TextBox::nX + TextBox::nW 
	   &amp;&amp; nY &gt;= TextBox::nY &amp;&amp; nY &lt;= TextBox::nY + TextBox::nH)
	{return 1;}
}
</code></pre>
<p>Winadapt.cpp</p>
<pre><code class="language-cpp">#include &lt;stdlib.h&gt;
#include &lt;stdio.h&gt;
#include &lt;string.h&gt;
#include &quot;WinAdapt.h&quot;
#include &quot;TextBox.h&quot;
#include &quot;Schalter.h&quot;

//TextBox t(&quot; Test &quot; ,100 ,100 ,60 ,30);
Schalter s(&quot;On&quot;,&quot;Off&quot; ,100 ,100);

void VtlZyk(void)
{
}

void VtlMouse(int X, int Y)
{ 
}

void VtlKeyHit(int key)
{
}

void VtlInit(void)
{ 
}

void VtlPaint(int xl, int yo, int xr, int yu)
{
	//t. Show (); // 2. Test Show () / Konstruktor
	//TextBox tt(t); // 3. Test Copykonstruktor
	//tt. Show ();
}
</code></pre>
<p>winadapt.cpp</p>
<pre><code class="language-cpp">/*
   Windows- Adapter- Programm
   PIN3 SS99
   Kn/Bö
   DIESE DATEI SOLL NICHT GEAENDERT WERDEN
*/

#include &lt;windows.h&gt;
#include &lt;string.h&gt;
#include &quot;WinAdapt.h&quot;

#define SIMPROTIMER 4711
#define UPDINTERVALL 200  //msec. zwischen updates

HDC Ghdc;

extern void VtlPaint(int, int, int, int);
extern void VtlZyk(void);
extern void VtlMouse(int X, int Y);
extern void VtlKeyHit(int key);
extern void VtlInit(void);

LRESULT CALLBACK WndProc (HWND, UINT, UINT, LONG) ;
void Loop();

HPEN hpNewPen=0;
HBRUSH hbNewBrush=0;

int CALLBACK WinMain(
    IN HINSTANCE hInstance,
    IN HINSTANCE hPrevInstance,
    IN LPSTR lpCmdLine,
    IN int nShowCmd
    )
{ static char szAppName[] = &quot;HelloWin&quot; ;
  HWND        hwnd ;
  MSG         msg ;
  WNDCLASS    wndclass ;
  if (!hPrevInstance)
  { wndclass.style         = CS_HREDRAW | CS_VREDRAW ;
    wndclass.lpfnWndProc   = WndProc ;
    wndclass.cbClsExtra    = 0 ;
    wndclass.cbWndExtra    = 0 ;
    wndclass.hInstance     = (HINSTANCE)hInstance ;
    wndclass.hIcon         = LoadIcon(NULL,IDI_APPLICATION);
    wndclass.hCursor       = LoadCursor(NULL,IDC_ARROW);
    wndclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
    wndclass.lpszMenuName  = NULL ;
    wndclass.lpszClassName = szAppName ;
    RegisterClass (&amp;wndclass) ; }
   hwnd = CreateWindow (szAppName,        //Fenst.klassenname
                              &quot;Anwendungsfenster&quot;, //Titelleiste
                    WS_OVERLAPPEDWINDOW, //Fensterstil
                    CW_USEDEFAULT,       //Fensterpos, x
                              CW_USEDEFAULT,       //Fensterpos, y
                              CW_USEDEFAULT,       //horizontale Groesse
                              CW_USEDEFAULT,       //vertikale   Groesse
                              NULL,                //Parent Window
                              NULL,                //Handle Menue
                              (HINSTANCE)hInstance,           //Handle Instanz
                    NULL) ;              //Spezialparameter
  ShowWindow (hwnd, nShowCmd) ;
  UpdateWindow (hwnd) ;
  while (GetMessage (&amp;msg, NULL, 0, 0))
          { TranslateMessage (&amp;msg) ;
            DispatchMessage (&amp;msg) ; }
  return msg.wParam ;
}
LRESULT CALLBACK WndProc  (HWND hwnd, UINT message,
                                 UINT wParam, LONG lParam)
{ PAINTSTRUCT ps; RECT rect;
  switch (message)
  { case WM_CREATE :
      VtlInit();
      SetTimer(hwnd, SIMPROTIMER, UPDINTERVALL, NULL);
      return 0;
    case WM_TIMER :
      if (wParam == SIMPROTIMER){
        VtlZyk();
        InvalidateRect(hwnd, NULL, TRUE);
      }
      return 0;
    case WM_PAINT :
      Ghdc = BeginPaint (hwnd, &amp;ps) ;
      GetClientRect (hwnd, &amp;rect) ;
      VtlPaint(rect.left, rect.top, rect.right, rect.bottom);
      EndPaint (hwnd, &amp;ps) ;
      return 0 ;
    case WM_LBUTTONUP :
      VtlMouse(LOWORD(lParam), HIWORD(lParam));
      return 0;
      case WM_CHAR :
        VtlKeyHit(wParam);
        return 0;
    case WM_DESTROY : PostQuitMessage (0) ; return 0 ;
  }
  return DefWindowProc (hwnd, message, wParam, lParam) ;
}

void Text(int xa, int ya, char txt[])
{ TextOut(Ghdc, xa, ya, txt, strlen(txt)); }

void Line(int xa, int ya, int xe, int ye)
{ MoveToEx(Ghdc, xa, ya, NULL); LineTo(Ghdc, xe, ye); }

void Rect(int xa, int ya, int xe, int ye)
{ Rectangle(Ghdc, xa, ya, xe, ye); }

void Elli(int xa, int ya, int xe, int ye)
{ Ellipse(Ghdc, xa, ya, xe, ye); }

void LineCol(int r, int g, int b)
{  HPEN hp=hpNewPen;
   hpNewPen=CreatePen(PS_SOLID, 1, RGB(r,g,b));
   SelectObject(Ghdc, hpNewPen);
   if (hp)DeleteObject(hp);
}

void FillCol(int r, int g, int b)
{  HBRUSH hb=hbNewBrush;
   hbNewBrush=CreateSolidBrush(RGB(r,g,b));
   //hbNewBrush=CreateHatchBrush(HS_BDIAGONAL, RGB(r,g,b));
   SelectObject(Ghdc, hbNewBrush);
   if (hb)DeleteObject(hb);
}

void PutPixel(int xa, int ya, COLORREF crColora)
{ SetPixel(Ghdc, xa, ya, crColora); }

void FillPoly(int* lpPoint, int nPoints)
{ int fResult=Polygon(Ghdc, (LPPOINT)lpPoint, nPoints); }
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1522406</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1522406</guid><dc:creator><![CDATA[ruebe]]></dc:creator><pubDate>Wed, 04 Jun 2008 11:19:12 GMT</pubDate></item><item><title><![CDATA[Reply to Konstruktor fehler on Wed, 04 Jun 2008 11:20:25 GMT]]></title><description><![CDATA[<p>Scheiße Falscher Bereich. Sorry. Bitte verschieben</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1522407</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1522407</guid><dc:creator><![CDATA[ruebe]]></dc:creator><pubDate>Wed, 04 Jun 2008 11:20:25 GMT</pubDate></item><item><title><![CDATA[Reply to Konstruktor fehler on Wed, 04 Jun 2008 17:25:34 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile-var-mode-is-viewprofile-and-u-is-18363.html" rel="nofollow">Jochen Kalmbach</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-58.html" rel="nofollow">C++/CLI mit .NET</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-15.html" rel="nofollow">C++</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39405.html" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1522690</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1522690</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Wed, 04 Jun 2008 17:25:34 GMT</pubDate></item><item><title><![CDATA[Reply to Konstruktor fehler on Wed, 04 Jun 2008 17:31:49 GMT]]></title><description><![CDATA[<p>ruebe schrieb:</p>
<blockquote>
<p>Hallo, ich vermute das ich einen Fehler im Konstruktor für Schalter habe. Leider finde ich ihn nicht mit der Fehlerausgabe kann ich leider nichts anfangen da mir der Compiler nur &quot;Debug Assertion failed&quot; sagt.</p>
</blockquote>
<p>Das heißt aber nicht, dass du uns vorenthalten solltest, wo dieses fehlschlagende assert steht und, falls es in irgendwelchen Teilen der Standardbibliothek passiert, welche deiner Funktionen der unmittelbare Aufrufer ist (Stacktrace). Im Übrigen passen die news nicht zu delete[] und deine Klassen sollten auch einen eigenen Zuweisungsoperator anbieten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1522694</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1522694</guid><dc:creator><![CDATA[camper]]></dc:creator><pubDate>Wed, 04 Jun 2008 17:31:49 GMT</pubDate></item><item><title><![CDATA[Reply to Konstruktor fehler on Thu, 05 Jun 2008 06:48:53 GMT]]></title><description><![CDATA[<p>ruebe schrieb:</p>
<blockquote>
<p>...mit der Fehlerausgabe kann ich leider nichts anfangen da mir der Compiler nur &quot;Debug Assertion failed&quot; sagt. Vllt. sieht ihn einer von euch....</p>
</blockquote>
<p>Indem Du uns 450 Zeilen Quellcode vor die Füße wirfst ?<br />
Sorry - soviel unnütze Zeit habe ich nicht übrig.</p>
<p>Gruß,</p>
<p>Simon2.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1522927</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1522927</guid><dc:creator><![CDATA[Simon2]]></dc:creator><pubDate>Thu, 05 Jun 2008 06:48:53 GMT</pubDate></item><item><title><![CDATA[Reply to Konstruktor fehler on Thu, 05 Jun 2008 07:28:18 GMT]]></title><description><![CDATA[<p>Sorry ich wollte eigentlich gestern noch die gesamte Fehlerausgabe einstellen.<br />
Aber durch das Wetter gestern hatte ich keine Internetverbindung.<br />
Hier die gesamte Fehlerausgabe:</p>
<p>Debug Assertion Failed!<br />
Programm:... tein\VisualStudio\Projexts\Debug\Schalter.exe<br />
File: f:\dd\vctools\crt_bld\self_x86\crt\src\dbgel.cpp<br />
LINE: 52</p>
<p>Expression: _BLOCK_TYPE_IS_VALID(pHead-&gt;nBlockUse)</p>
<p>For information see the Visual C++ documentation on asserts.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1522951</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1522951</guid><dc:creator><![CDATA[ruebe]]></dc:creator><pubDate>Thu, 05 Jun 2008 07:28:18 GMT</pubDate></item></channel></rss>