<?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[FRAGE ZÄHLSCHLEIFE]]></title><description><![CDATA[<p>HALLO LEUTE<br />
WER KANN MIR HELFEN EINE ZÄHLSCHLEIFE ZU ERSTELLEN, DIE BEIM KLICK AUF DEN MENÜPUNKT START, DIE LABELS ANGEFANGEN BEI 1 DANN 2 DANN 3 DANN 4 ANZEIGT(EINE SEKUNDE) UND DANN STOPPT. DIE BETREFFENDE CODESTELLE IST DURCH /************/GEKENNZEICHNET!!!<br />
DER REST KLAPPT SUPER<br />
DAS IST SEHR WICHTIG FÜR MICH</p>
<pre><code class="language-cpp">class __Form1_declspec Form1 : public __Form1_Base
{

    public:
        // add your public instance data here

    private:
         WBool _Set_Text(void); // add your private instance data here
         WInt _text_nr;
         WInt _um1;

    protected:
        // add your protected instance data here

};

// Code added here will be included at the top of the .CPP file
 WBool Form1::_Set_Text(void)
 {

    _um1=(_um1+1)%4;

  switch (_um1)
    {
     case 0:
           label_1-&gt;SetText( &quot;1 Text Position&quot; );
           label_2-&gt;SetText( &quot; &quot; );
           label_3-&gt;SetText( &quot; &quot; );
           label_4-&gt;SetText( &quot; &quot; );
       break;
       case 1:

            label_1-&gt;SetText( &quot;&quot; );
            label_2-&gt;SetText( &quot;2 Text Position &quot; );
            label_3-&gt;SetText( &quot;&quot; );
            label_4-&gt;SetText( &quot; &quot; );

       break;
      case 2:

           label_1-&gt;SetText( &quot;&quot; );
           label_2-&gt;SetText( &quot;&quot; );
           label_3-&gt;SetText( &quot;  3 Text Position &quot; );
           label_4-&gt;SetText( &quot;  &quot; );

      break;
       case 3:

            label_1-&gt;SetText( &quot; &quot; );
            label_2-&gt;SetText( &quot; &quot; );
            label_3-&gt;SetText( &quot; &quot; );
            label_4-&gt;SetText( &quot;4 Text Position &quot; );

      break; 

    }
  return FALSE;
   }

//  Include definitions for resources.
#include &quot;WRes.h&quot;

Form1::Form1()
{
 _text_nr = 0;

}

Form1::~Form1()
{

}

WBool Form1::menu_1_ErstePosition_Click(
    WObject *           source,
    WEventData *        event )
{
           label_1-&gt;SetText( &quot;1 Text Position &quot; );
           label_2-&gt;SetText( &quot; &quot; );
           label_3-&gt;SetText( &quot; &quot; );
           label_4-&gt;SetText( &quot; &quot; );
             if (_text_nr == 0 ) 
{ _um1 = 0;}
    return FALSE;
}

WBool Form1::menu_1_ZweitePosition_Click(
    WObject *           source,
    WEventData *        event )
{
            label_1-&gt;SetText( &quot; &quot; );
            label_2-&gt;SetText( &quot;2 Text Position &quot; );
            label_3-&gt;SetText( &quot; &quot; );
            label_4-&gt;SetText( &quot; &quot; );
        if (_text_nr == 0  ) 
{ _um1 = 1;}
    return FALSE;
}

WBool Form1::menu_1_DrittePosition_Click(
    WObject *           source,
    WEventData *        event )
{
            label_1-&gt;SetText( &quot; &quot; );
            label_2-&gt;SetText( &quot; &quot; );
            label_3-&gt;SetText( &quot; 3 Text Position&quot; );
            label_4-&gt;SetText( &quot; &quot; );
        if (_text_nr == 0 )  
{ _um1 = 2;}
    return FALSE;
}

WBool Form1::menu_1_ViertePosition_Click(
    WObject *           source,
    WEventData *        event )
{
            label_1-&gt;SetText( &quot; &quot; );
            label_2-&gt;SetText( &quot; &quot; );
            label_3-&gt;SetText( &quot; &quot; );
            label_4-&gt;SetText( &quot; 4 Text Position&quot; ); 
        if (_text_nr == 0 ) 
             {_um1 = 3; }
    return FALSE;
}
/* ************************************ */

WBool Form1::menu_1_Start_Click(
    WObject *           source,
    WEventData *        event )
{

    if (_text_nr == 0)
    _text_nr =1;

 _Set_Text();

return FALSE;

}
/* *********************************  */

WBool Form1::cb_1_Click(
    WObject *           source,
    WEventData *        event )
{

if (_text_nr == 1)
     _text_nr = 0;

_Set_Text();

return FALSE;

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/145750/frage-zählschleife</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 05:27:02 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/145750.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 30 Apr 2006 20:42:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to FRAGE ZÄHLSCHLEIFE on Sun, 30 Apr 2006 20:42:00 GMT]]></title><description><![CDATA[<p>HALLO LEUTE<br />
WER KANN MIR HELFEN EINE ZÄHLSCHLEIFE ZU ERSTELLEN, DIE BEIM KLICK AUF DEN MENÜPUNKT START, DIE LABELS ANGEFANGEN BEI 1 DANN 2 DANN 3 DANN 4 ANZEIGT(EINE SEKUNDE) UND DANN STOPPT. DIE BETREFFENDE CODESTELLE IST DURCH /************/GEKENNZEICHNET!!!<br />
DER REST KLAPPT SUPER<br />
DAS IST SEHR WICHTIG FÜR MICH</p>
<pre><code class="language-cpp">class __Form1_declspec Form1 : public __Form1_Base
{

    public:
        // add your public instance data here

    private:
         WBool _Set_Text(void); // add your private instance data here
         WInt _text_nr;
         WInt _um1;

    protected:
        // add your protected instance data here

};

// Code added here will be included at the top of the .CPP file
 WBool Form1::_Set_Text(void)
 {

    _um1=(_um1+1)%4;

  switch (_um1)
    {
     case 0:
           label_1-&gt;SetText( &quot;1 Text Position&quot; );
           label_2-&gt;SetText( &quot; &quot; );
           label_3-&gt;SetText( &quot; &quot; );
           label_4-&gt;SetText( &quot; &quot; );
       break;
       case 1:

            label_1-&gt;SetText( &quot;&quot; );
            label_2-&gt;SetText( &quot;2 Text Position &quot; );
            label_3-&gt;SetText( &quot;&quot; );
            label_4-&gt;SetText( &quot; &quot; );

       break;
      case 2:

           label_1-&gt;SetText( &quot;&quot; );
           label_2-&gt;SetText( &quot;&quot; );
           label_3-&gt;SetText( &quot;  3 Text Position &quot; );
           label_4-&gt;SetText( &quot;  &quot; );

      break;
       case 3:

            label_1-&gt;SetText( &quot; &quot; );
            label_2-&gt;SetText( &quot; &quot; );
            label_3-&gt;SetText( &quot; &quot; );
            label_4-&gt;SetText( &quot;4 Text Position &quot; );

      break; 

    }
  return FALSE;
   }

//  Include definitions for resources.
#include &quot;WRes.h&quot;

Form1::Form1()
{
 _text_nr = 0;

}

Form1::~Form1()
{

}

WBool Form1::menu_1_ErstePosition_Click(
    WObject *           source,
    WEventData *        event )
{
           label_1-&gt;SetText( &quot;1 Text Position &quot; );
           label_2-&gt;SetText( &quot; &quot; );
           label_3-&gt;SetText( &quot; &quot; );
           label_4-&gt;SetText( &quot; &quot; );
             if (_text_nr == 0 ) 
{ _um1 = 0;}
    return FALSE;
}

WBool Form1::menu_1_ZweitePosition_Click(
    WObject *           source,
    WEventData *        event )
{
            label_1-&gt;SetText( &quot; &quot; );
            label_2-&gt;SetText( &quot;2 Text Position &quot; );
            label_3-&gt;SetText( &quot; &quot; );
            label_4-&gt;SetText( &quot; &quot; );
        if (_text_nr == 0  ) 
{ _um1 = 1;}
    return FALSE;
}

WBool Form1::menu_1_DrittePosition_Click(
    WObject *           source,
    WEventData *        event )
{
            label_1-&gt;SetText( &quot; &quot; );
            label_2-&gt;SetText( &quot; &quot; );
            label_3-&gt;SetText( &quot; 3 Text Position&quot; );
            label_4-&gt;SetText( &quot; &quot; );
        if (_text_nr == 0 )  
{ _um1 = 2;}
    return FALSE;
}

WBool Form1::menu_1_ViertePosition_Click(
    WObject *           source,
    WEventData *        event )
{
            label_1-&gt;SetText( &quot; &quot; );
            label_2-&gt;SetText( &quot; &quot; );
            label_3-&gt;SetText( &quot; &quot; );
            label_4-&gt;SetText( &quot; 4 Text Position&quot; ); 
        if (_text_nr == 0 ) 
             {_um1 = 3; }
    return FALSE;
}
/* ************************************ */

WBool Form1::menu_1_Start_Click(
    WObject *           source,
    WEventData *        event )
{

    if (_text_nr == 0)
    _text_nr =1;

 _Set_Text();

return FALSE;

}
/* *********************************  */

WBool Form1::cb_1_Click(
    WObject *           source,
    WEventData *        event )
{

if (_text_nr == 1)
     _text_nr = 0;

_Set_Text();

return FALSE;

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1048619</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1048619</guid><dc:creator><![CDATA[Renate]]></dc:creator><pubDate>Sun, 30 Apr 2006 20:42:00 GMT</pubDate></item><item><title><![CDATA[Reply to FRAGE ZÄHLSCHLEIFE on Mon, 01 May 2006 05:32:17 GMT]]></title><description><![CDATA[<p>1. Was hat das ganze mit MFC zu tun?<br />
2. Kauf Dir mal eine neue Tastatur, die liefert nur noch Grossbuchstaben...<br />
3. Du brauchst einen Timer (SetTimer)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1048697</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1048697</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Mon, 01 May 2006 05:32:17 GMT</pubDate></item></channel></rss>