<?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[Zu blöd für CListCtrl?]]></title><description><![CDATA[<p>Ich dreh gleich durch. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /></p>
<p>Das kann doch gar nicht sein. Wieso funktioniert das nicht. Ich will einfach einen ersten Eintrag in einer ListCtrl einfügen. Das kann doch nicht so schwer sein.</p>
<p>Meine Membervariable heißt</p>
<pre><code class="language-cpp">CListCtrl m_lcProgramm;
</code></pre>
<p>Als erstes benenne ich die Spalten</p>
<pre><code class="language-cpp">m_lcProgramm.InsertColumn(0,&quot;Uhrzeit&quot;,LVCFMT_CENTER,50,1);	
m_lcProgramm.InsertColumn(1,&quot;Event&quot;,LVCFMT_LEFT,200,1);
m_lcProgramm.InsertColumn(2,&quot;Streamer&quot;,LVCFMT_LEFT,200,1);
m_lcProgramm.InsertColumn(3,&quot;ON AIR&quot;,LVCFMT_CENTER,50,1);
</code></pre>
<p>Soweit so gut. Alles i.O.<br />
Wenn ich jetzt ein Eintrag mache schmiert das Prog ab.</p>
<pre><code class="language-cpp">UpdateData(FALSE);
int nItem = m_lcProgramm.GetItemCount();
m_lcProgramm.InsertItem(nItem,&quot;Uhrzeit&quot; ,0);
m_lcProgramm.SetItemText(nItem,1,&quot;20:15&quot;);
</code></pre>
<p>Aber was ist daran falsch?<br />
Ich find den Fehler nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/73144/zu-blöd-für-clistctrl</link><generator>RSS for Node</generator><lastBuildDate>Mon, 27 Apr 2026 03:42:02 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/73144.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 06 May 2004 15:29:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Zu blöd für CListCtrl? on Thu, 06 May 2004 15:29:19 GMT]]></title><description><![CDATA[<p>Ich dreh gleich durch. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /></p>
<p>Das kann doch gar nicht sein. Wieso funktioniert das nicht. Ich will einfach einen ersten Eintrag in einer ListCtrl einfügen. Das kann doch nicht so schwer sein.</p>
<p>Meine Membervariable heißt</p>
<pre><code class="language-cpp">CListCtrl m_lcProgramm;
</code></pre>
<p>Als erstes benenne ich die Spalten</p>
<pre><code class="language-cpp">m_lcProgramm.InsertColumn(0,&quot;Uhrzeit&quot;,LVCFMT_CENTER,50,1);	
m_lcProgramm.InsertColumn(1,&quot;Event&quot;,LVCFMT_LEFT,200,1);
m_lcProgramm.InsertColumn(2,&quot;Streamer&quot;,LVCFMT_LEFT,200,1);
m_lcProgramm.InsertColumn(3,&quot;ON AIR&quot;,LVCFMT_CENTER,50,1);
</code></pre>
<p>Soweit so gut. Alles i.O.<br />
Wenn ich jetzt ein Eintrag mache schmiert das Prog ab.</p>
<pre><code class="language-cpp">UpdateData(FALSE);
int nItem = m_lcProgramm.GetItemCount();
m_lcProgramm.InsertItem(nItem,&quot;Uhrzeit&quot; ,0);
m_lcProgramm.SetItemText(nItem,1,&quot;20:15&quot;);
</code></pre>
<p>Aber was ist daran falsch?<br />
Ich find den Fehler nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/515440</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/515440</guid><dc:creator><![CDATA[Trikor]]></dc:creator><pubDate>Thu, 06 May 2004 15:29:19 GMT</pubDate></item><item><title><![CDATA[Reply to Zu blöd für CListCtrl? on Thu, 06 May 2004 18:23:57 GMT]]></title><description><![CDATA[<p>Ich sehe da keine Fehler. Wie stürzt den das Programm ab und vorallem wo.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/515546</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/515546</guid><dc:creator><![CDATA[Unix-Tom]]></dc:creator><pubDate>Thu, 06 May 2004 18:23:57 GMT</pubDate></item><item><title><![CDATA[Reply to Zu blöd für CListCtrl? on Thu, 06 May 2004 18:36:50 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>ich habe die Initialisierung des List-Controls bei einer View mal in<br />
der Method OnCreate ausgeführt. Bei einem Dialog, wie es anscheinend bei dir ist (UpdateData) sollte es funktionieren wenn du folgenden code in der methode OnInitiDialog aufrufst.</p>
<pre><code>m_wndListCtrl.Create(WS_CHILD|WS_VISIBLE|LVS_REPORT, CRect(0,0,0,0), this, 0xff);

	m_wndListCtrl.InsertColumn(0, &quot;Uhrzeit&quot;, LVCFMT_CENTER, 50);    
	m_wndListCtrl.InsertColumn(1, &quot;Event&quot;, LVCFMT_LEFT,200); 
	m_wndListCtrl.InsertColumn(2, &quot;Streamer&quot;, LVCFMT_LEFT,200); 
	m_wndListCtrl.InsertColumn(3, &quot;ON AIR&quot;,LVCFMT_CENTER,50); 

	int nItem = m_wndListCtrl.GetItemCount(); 
	nItem = m_wndListCtrl.InsertItem(nItem, &quot;20:15&quot; ,-1); 
	m_wndListCtrl.SetItemText(nItem, 1, &quot;Backup started&quot;);
	m_wndListCtrl.SetItemText(nItem, 2, &quot;HP DAT-Streamer&quot;);
	m_wndListCtrl.SetItemText(nItem, 3, &quot;offline&quot;);
</code></pre>
<p>Gruss<br />
Frank</p>
]]></description><link>https://www.c-plusplus.net/forum/post/515551</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/515551</guid><dc:creator><![CDATA[Frank++]]></dc:creator><pubDate>Thu, 06 May 2004 18:36:50 GMT</pubDate></item><item><title><![CDATA[Reply to Zu blöd für CListCtrl? on Thu, 06 May 2004 22:06:44 GMT]]></title><description><![CDATA[<p>also wenn du die spalten machst, und compelierst dann siechst ja die spalten mit der entsprechenden beschriftung und breite ( oh welche weissheit )</p>
<p>jetzt möchtest du z.b. eine ( erste ) zeile machen wo du dann ( 4 spalten ) also 4 sachen reinschreiben willst</p>
<p>dann musst du erst</p>
<p>[cpp]<br />
m_mylist.InsertItem(row,&quot;&quot;); // eine neue leere erzeugen</p>
<p>m_mylist.SetItemText(row,0,wert1); // <strong>row</strong> ist am anfang 1 oder sogar 0( musst ausprobieren ), <strong>0</strong> bedeutet erste spalte und <strong>wert1</strong> ist z.b. deine uhrzeit<br />
m_mylist.SetItemText(row,1,wert2); // <strong>row</strong> immer noch 0 oder 1, <strong>1</strong> = 2te spalte usw<br />
//usw</p>
<p>[/cpp]</p>
<p>so müsste es gehen.</p>
<p>ich hab row in die .h geschrieben, und zähle immer dann eines hoch wenn ich eine neue zeile brauche.<br />
maybe gibts ne elegantere lösung, aber mit der kann ich leben</p>
]]></description><link>https://www.c-plusplus.net/forum/post/515679</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/515679</guid><dc:creator><![CDATA[newkid]]></dc:creator><pubDate>Thu, 06 May 2004 22:06:44 GMT</pubDate></item><item><title><![CDATA[Reply to Zu blöd für CListCtrl? on Fri, 07 May 2004 04:34:54 GMT]]></title><description><![CDATA[<p>Leute, das hat er doch gemacht. Wenn man ein Steuerelement mit der MFC erstellt muss man nicht Create aufrufen, da man einfach das Steuerelement auf den Dialog plaziert.</p>
<p>Ich warte noch auf den Source wo der Fehler ausgelöst wird.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/515703</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/515703</guid><dc:creator><![CDATA[Unix-Tom]]></dc:creator><pubDate>Fri, 07 May 2004 04:34:54 GMT</pubDate></item><item><title><![CDATA[Reply to Zu blöd für CListCtrl? on Fri, 07 May 2004 06:32:27 GMT]]></title><description><![CDATA[<p>Das er create bei einem Dialog nicht aufrufen muss, sollte klar sein.<br />
Deswegen habe ich dabei geschrieben das ich es in einer CView gecodet habe.</p>
<p>Ausserdem setze ich bei InsertColumn die subitems nicht auf 1!</p>
<pre><code>m_lcProgramm.InsertColumn(0,&quot;Uhrzeit&quot;,LVCFMT_CENTER,50,1);
</code></pre>
<p>zudem setzt Trikor bei SetItemText das Item nicht auf das aktuelle von InsertItem zurückgelieferte Item sondern auf den Wert den GetCount() zurückliefert.</p>
<pre><code>int nItem = m_lcProgramm.GetItemCount(); 
m_lcProgramm.InsertItem(nItem,&quot;Uhrzeit&quot; ,0); 
m_lcProgramm.SetItemText(nItem,1,&quot;20:15&quot;);
</code></pre>
<p>btw. ist das Image auf 0 gesetzt und nicht auf -1, was für KEIN Image steht.</p>
<p>Wenn das noch nicht hilft, kann man nur raten welche ListControl-Eigenschaften im DialogEditor eingestellt sind.</p>
<p>Vielleicht kein Report??? -&gt; keine Ahnung endet eh nur in Vermutungen....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/515720</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/515720</guid><dc:creator><![CDATA[Frank++]]></dc:creator><pubDate>Fri, 07 May 2004 06:32:27 GMT</pubDate></item><item><title><![CDATA[Reply to Zu blöd für CListCtrl? on Fri, 07 May 2004 06:49:33 GMT]]></title><description><![CDATA[<p>@unixtom- was war an meinem vorschlag schlecht?</p>
<p>@ anderer vorschlag. als ich das erste mal die klasse verwendet habe, habe ich in den eigenschaften nicht umgestellt. es ist ja am anfang ( dei den eigenschaften ) bei darstellung und dann ANSICHT ist es ja am anfang auf ICON hab ich umgestellt auf LISTE, dann gings, liegts daran???</p>
]]></description><link>https://www.c-plusplus.net/forum/post/515728</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/515728</guid><dc:creator><![CDATA[newkid]]></dc:creator><pubDate>Fri, 07 May 2004 06:49:33 GMT</pubDate></item><item><title><![CDATA[Reply to Zu blöd für CListCtrl? on Fri, 07 May 2004 07:39:37 GMT]]></title><description><![CDATA[<p>Ich mach das immer so.</p>
<pre><code class="language-cpp">m_listctrl.InsertColumn(0,&quot;Kurzwahl&quot;,LVCFMT_LEFT,100);
m_listctrl.InsertColumn(1,&quot;Keyword&quot;,LVCFMT_LEFT,100);
m_listctrl.InsertItem(m_listctrl.GetItemCount(),neue.shortnumber);
m_listctrl.SetItemText(m_listctrl.GetItemCount()-1,1,neue.keywordname);
</code></pre>
<p>So wie Trikor es gemacht hat ist es aber auch richtig.<br />
SDein Code ist richtig und deshalb hilft es nur wenn er mehr zu seinem Source erzählt. Vorallem wo es abstützt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/515759</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/515759</guid><dc:creator><![CDATA[Unix-Tom]]></dc:creator><pubDate>Fri, 07 May 2004 07:39:37 GMT</pubDate></item><item><title><![CDATA[Reply to Zu blöd für CListCtrl? on Fri, 07 May 2004 09:37:17 GMT]]></title><description><![CDATA[<p>Egal was ich mache, das Programm schmiert immer in der winctrl.cpp bei Zeile 599</p>
<pre><code class="language-cpp">oid CListCtrl::DrawItem(LPDRAWITEMSTRUCT)
{
	ASSERT(FALSE);
}
</code></pre>
<p>ab.<br />
Mit dem Debugger läuft er durch die Funktion ohne zu meckern. Bis er irgenwann sagt, Kein Quellcode mehr verfügbar. Doch wenn ich dann F5 drücke um das Programm weiter laufen zu lassen, schmiert es ab.<br />
Wenn ich</p>
<pre><code class="language-cpp">nItem = m_lcProgramm.InsertItem(nItem, &quot;20:15&quot; ,-1);
</code></pre>
<p>auskommentiere, läuft das Programm durch (ohne Absturz), schreibt aber natürlich keine Zeile dazu. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<pre><code class="language-cpp">Create(WS_CHILD|WS_VISIBLE|LVS_REPORT, CRect(0,0,0,0), this, 0xff);
</code></pre>
<p>funktioniert!<br />
Aber dabei muß ich dann</p>
<pre><code class="language-cpp">DDX_Control(pDX, IDC_LPROG, m_lcProgramm);
</code></pre>
<p>auskommentieren. Aber das kann´s ja eigentlich nicht sein, oder?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/515832</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/515832</guid><dc:creator><![CDATA[Trikor]]></dc:creator><pubDate>Fri, 07 May 2004 09:37:17 GMT</pubDate></item><item><title><![CDATA[Reply to Zu blöd für CListCtrl? on Fri, 07 May 2004 09:40:22 GMT]]></title><description><![CDATA[<p>wenn der Absturz bei SetItemText() kommt, könnte es daran liegen, dass versehentlich das &quot;Besitzerdaten&quot; (ownerdata) Häkchen gesetzt wurde.<br />
Das hatte ich gerade kürzlich bei mir... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/515836</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/515836</guid><dc:creator><![CDATA[KeinPWzurHand]]></dc:creator><pubDate>Fri, 07 May 2004 09:40:22 GMT</pubDate></item><item><title><![CDATA[Reply to Zu blöd für CListCtrl? on Fri, 07 May 2004 09:56:29 GMT]]></title><description><![CDATA[<p>Besitzerdaten steht auf FALSE;</p>
<p>Und der Absturz scheint durch InsertItem zu entstehen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/515847</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/515847</guid><dc:creator><![CDATA[Trikor]]></dc:creator><pubDate>Fri, 07 May 2004 09:56:29 GMT</pubDate></item><item><title><![CDATA[Reply to Zu blöd für CListCtrl? on Fri, 07 May 2004 10:02:23 GMT]]></title><description><![CDATA[<p>Stell mal dein Project online.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/515850</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/515850</guid><dc:creator><![CDATA[Unix-Tom]]></dc:creator><pubDate>Fri, 07 May 2004 10:02:23 GMT</pubDate></item><item><title><![CDATA[Reply to Zu blöd für CListCtrl? on Fri, 07 May 2004 10:22:11 GMT]]></title><description><![CDATA[<p>Unix-Tom schrieb:</p>
<blockquote>
<p>Stell mal dein Project online.</p>
</blockquote>
<p>Ich schätze mal, wenn ich das mach, kann ich mir meine Papiere abholen. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>Na ja, O.K. Das eine ist ja nur ein kleines Dialogfeld welches eingeführt wird.<br />
Also die Header-Datei</p>
<pre><code class="language-cpp">class CZeitschrift : public CDialog
{
	DECLARE_DYNAMIC(CZeitschrift)

public:
	CZeitschrift(CWnd* pParent = NULL);   // Standardkonstruktor
	virtual ~CZeitschrift();

// Dialogfelddaten
	enum { IDD = IDD_PROGRDLG };

protected:
	CBrush m_Brush;
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV-Unterstützung
	virtual BOOL OnInitDialog(void);
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	DECLARE_MESSAGE_MAP()
public:
	CBrush dialog_brush;
	CBrush list_brush;
	afx_msg void OnBnClickedClose();
	afx_msg void OnBnClickedTestbutton();
	CString Datum;
	CStringArray strAEvent;
	CStringArray m_strTime;
	CStringArray m_strEvent;
	CStringArray m_strSender;
	CStringArray m_strStart;
	CStringArray m_strChannel;
	void FirstEintrag(void);
	CListCtrl m_lcProgramm;
};
</code></pre>
<p>Und die .cpp</p>
<pre><code class="language-cpp">// Zeitschrift.cpp : Implementierungsdatei
//

#include &quot;stdafx.h&quot;
#include &quot;Hauptprogramm.h&quot;
#include &quot;HauptprogrammDlg.h&quot;
#include &quot;Zeitschrift.h&quot;
#include &quot;.\zeitschrift.h&quot;
#include &lt;afxinet.h&gt;

// CZeitschrift-Dialogfeld

IMPLEMENT_DYNAMIC(CZeitschrift, CDialog)
CZeitschrift::CZeitschrift(CWnd* pParent /*=NULL*/)
	: CDialog(CZeitschrift::IDD, pParent)
	, Datum(_T(&quot;&quot;))
{
	dialog_brush.CreateSolidBrush(0x00E5E6E6);
	list_brush.CreateSolidBrush(RGB(255,255,255));
}

CZeitschrift::~CZeitschrift()
{

}

void CZeitschrift::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//DDX_Control(pDX, IDC_LPROG, m_lcProgramm);
}

BEGIN_MESSAGE_MAP(CZeitschrift, CDialog)
	ON_BN_CLICKED(IDC_CLOSE, OnBnClickedClose)
	ON_BN_CLICKED(IDC_TESTBUTTON, OnBnClickedTestbutton)
	ON_WM_CTLCOLOR()
END_MESSAGE_MAP()

// CZeitschrift-Meldungshandler

void CZeitschrift::OnBnClickedClose()
{
	OnOK();
}

BOOL CZeitschrift::OnInitDialog(void)
{
	CDialog::OnInitDialog();

	// Hinzufügen des Menübefehls &quot;Info...&quot; zum Systemmenü.

	// IDM_ABOUTBOX muss sich im Bereich der Systembefehle befinden.
	ASSERT((IDM_ABOUTBOX &amp; 0xFFF0) == IDM_ABOUTBOX);
	ASSERT(IDM_ABOUTBOX &lt; 0xF000);

	CMenu* pSysMenu = GetSystemMenu(FALSE);
	if (pSysMenu != NULL)
	{
		CString strAboutMenu;
		strAboutMenu.LoadString(IDS_ABOUTBOX);
		if (!strAboutMenu.IsEmpty())
		{	
			pSysMenu-&gt;AppendMenu(MF_SEPARATOR);
			pSysMenu-&gt;AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
		}
	}
	m_lcProgramm.Create(WS_CHILD|WS_VISIBLE|LVS_REPORT|WS_BORDER, CRect(0,0,0,0), this, 0xff);
	m_lcProgramm.SetWindowPos(NULL, 10, 50, 502, 200, SWP_NOZORDER); 
	m_lcProgramm.InsertColumn(0,&quot;Uhrzeit&quot;,LVCFMT_LEFT,50,0);	
	m_lcProgramm.InsertColumn(1,&quot;Event&quot;,LVCFMT_LEFT,200,0);
	m_lcProgramm.InsertColumn(2,&quot;Streamer&quot;,LVCFMT_LEFT,200,0);
	m_lcProgramm.InsertColumn(3,&quot;ON AIR&quot;,LVCFMT_LEFT,50,0);	
	m_Brush.CreateSolidBrush(0x00E5E6E6);
	return 0;
}

HBRUSH CZeitschrift::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) 
{
	HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);    
    switch (nCtlColor) 
    { 
    case CTLCOLOR_EDIT: 
        pDC-&gt;SetBkMode(TRANSPARENT);        
        hbr = (HBRUSH)list_brush;            // Setzt die Farbe für den Hintergrund    

        break; 
    case CTLCOLOR_LISTBOX:  
		pDC-&gt;SetBkMode(TRANSPARENT); 
		//pDC-&gt;SetDCBrushColor(0x00E5E6E6);
        hbr = (HBRUSH) list_brush;        // Setzt die Farbe für den Hintergrund       
        break;
	case CTLCOLOR_STATIC:
		pDC-&gt;SetBkMode(TRANSPARENT);
		hbr = (HBRUSH) TRANSPARENT;
		break;
	case CTLCOLOR_DLG:
		pDC-&gt;SetBkMode(TRANSPARENT);
        hbr = (HBRUSH) dialog_brush;
		break;
	default:
		pDC-&gt;SetBkMode(TRANSPARENT);
		hbr = (HBRUSH) dialog_brush;
		break;
    } 
    return hbr;
}

void CZeitschrift::OnBnClickedTestbutton()
{
	// Programm von Webseite holen
	CString Url = &quot;http://irgendwas.com/auth.php&quot;;
	Url += Datum;
	CString ReadTagesprog;
	ReadTagesprog = ((CHauptprogrammDlgnDlg*)GetParent())-&gt;GetHttpSource(Url);
	ReadTagesprog = &quot;2015;EVENT1;Streamer1;112;Ja;|2015;EVENT2;Streamer2;0;Nein;|&quot;;

	// String zerlegen
	CStringArray strATagesprogramm;

	int nAnzahlEvent = 0;
	int nAnzahlStreamer = 0;

	int i, j, old = 0,pos = 0; 
	// String trennen
	while(-1 != (pos = ReadTagesprog.Find('|',pos))) 
	{ 
		strAEvent.Add(ReadTagesprog.Mid(old,pos - old)); 
		old = ++pos; 
		nAnzahlEvent++;
	} 
	int n_Trenner = 0;
	// Zeilenanzahl festlegen

	i = 0, j = 0;
	old = 0,pos = 0; 

	while(j &lt; strAEvent.GetSize())
	{

		while( -1 != (pos = strAEvent[j].Find(';',pos)))
		{
			switch (n_Trenner)
			{
			case 0:
				m_strTime.Add(strAEvent[j].Mid(old, pos - old));
				break;
			case 1:
				m_strEvent.Add(strAEvent[j].Mid(old, pos - old));
				break;
			case 2:
				m_strSender.Add(strAEvent[j].Mid(old, pos - old));
				break;
			case 3:
				m_strChannel.Add(strAEvent[j].Mid(old, pos - old));
				break;
			case 4:
				m_strStart.Add(strAEvent[j].Mid(old, pos - old));
				break;
			}
			old = ++pos;
			n_Trenner++;
		}
		j++;
		old = 0;
		pos = 0;
		n_Trenner = 0;
	}
	FirstEintrag();
}

void CZeitschrift::FirstEintrag(void)
{
	UpdateData(TRUE);
	int nItem; 
	int nAnzahlEintraege = m_strTime.GetSize();
	if( nAnzahlEintraege &gt; 11)
		m_lcProgramm.SetWindowPos(NULL, 10, 50, 518, 200, SWP_NOZORDER);
	for(int i = 0; i &lt; nAnzahlEintraege; i++)
	{
		nItem = m_lcProgramm.GetItemCount();
		nItem = m_lcProgramm.InsertItem(nItem, m_strTime[i] ,-1); 
		m_lcProgramm.SetItemText(nItem, 1, m_strEvent[i]); 
		m_lcProgramm.SetItemText(nItem, 2, m_strSender[i]); 
		m_lcProgramm.SetItemText(nItem, 3, m_strStart[i]);	
	}
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/515857</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/515857</guid><dc:creator><![CDATA[Trikor]]></dc:creator><pubDate>Fri, 07 May 2004 10:22:11 GMT</pubDate></item><item><title><![CDATA[Reply to Zu blöd für CListCtrl? on Fri, 07 May 2004 10:16:00 GMT]]></title><description><![CDATA[<p>Schon mal in letzter Zeit ein<br />
Erstellen -&gt; Bereinigen<br />
Erstellen -&gt; Alles neu erstellen<br />
gemacht ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/515859</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/515859</guid><dc:creator><![CDATA[isabeau]]></dc:creator><pubDate>Fri, 07 May 2004 10:16:00 GMT</pubDate></item><item><title><![CDATA[Reply to Zu blöd für CListCtrl? on Fri, 07 May 2004 10:43:46 GMT]]></title><description><![CDATA[<p>isabeau schrieb:</p>
<blockquote>
<p>Schon mal in letzter Zeit ein<br />
Erstellen -&gt; Bereinigen<br />
Erstellen -&gt; Alles neu erstellen<br />
gemacht ?</p>
</blockquote>
<p>Aber sicher doch. War das erste!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/515873</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/515873</guid><dc:creator><![CDATA[Trikor]]></dc:creator><pubDate>Fri, 07 May 2004 10:43:46 GMT</pubDate></item><item><title><![CDATA[Reply to Zu blöd für CListCtrl? on Fri, 07 May 2004 10:52:37 GMT]]></title><description><![CDATA[<p>Das mit dem Create scheint wohl doch nicht ganz übergekommen zu sein...<br />
Bei dir braucht es kein create in der InitDialog, da bei Dialogen ja das control schon erzeugt wird.</p>
<p>Du verwendest bei InsertItem CStringArrays. Vielleicht liegt da der Fehler.<br />
CStrinArray operator[] liefert CObject* zurück und nicht LPCSTR!</p>
<p>Versuch mal einen Cast auf das CObject nach CString.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/515876</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/515876</guid><dc:creator><![CDATA[Frank++]]></dc:creator><pubDate>Fri, 07 May 2004 10:52:37 GMT</pubDate></item><item><title><![CDATA[Reply to Zu blöd für CListCtrl? on Fri, 07 May 2004 11:00:58 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">nItem = m_lcProgramm.GetItemCount();
nItem = m_lcProgramm.InsertItem(nItem, LPCSTR(m_strTime[i]) ,-1); 
m_lcProgramm.SetItemText(nItem, 1, LPCSTR(m_strEvent[i])); 
m_lcProgramm.SetItemText(nItem, 2, LPCSTR(m_strSender[i])); 
m_lcProgramm.SetItemText(nItem, 3, LPCSTR(m_strStart[i]));
</code></pre>
<p>Selber fehler <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /><br />
LPCTSTR klappt auch nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/515887</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/515887</guid><dc:creator><![CDATA[Trikor]]></dc:creator><pubDate>Fri, 07 May 2004 11:00:58 GMT</pubDate></item><item><title><![CDATA[Reply to Zu blöd für CListCtrl? on Fri, 07 May 2004 11:12:48 GMT]]></title><description><![CDATA[<p>Frank++ schrieb:</p>
<blockquote>
<p>Das mit dem Create scheint wohl doch nicht ganz übergekommen zu sein...<br />
Bei dir braucht es kein create in der InitDialog, da bei Dialogen ja das control schon erzeugt wird.</p>
</blockquote>
<p>Das ist ja das merkwürdige. Wenn ich die member-Variable von entferne und über Create ein ListCtrl erzeuge funktioniert InsertItem. Sogar ohne zu casten.<br />
Mach ich ne Member-Varialble auf ein ListCtrl, dann schäppert es.</p>
<p>Normal ist das nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/515892</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/515892</guid><dc:creator><![CDATA[Trikor]]></dc:creator><pubDate>Fri, 07 May 2004 11:12:48 GMT</pubDate></item><item><title><![CDATA[Reply to Zu blöd für CListCtrl? on Fri, 07 May 2004 12:26:54 GMT]]></title><description><![CDATA[<p>Versuche es mal mit<br />
ElementAt(i)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/515980</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/515980</guid><dc:creator><![CDATA[Unix-Tom]]></dc:creator><pubDate>Fri, 07 May 2004 12:26:54 GMT</pubDate></item><item><title><![CDATA[Reply to Zu blöd für CListCtrl? on Fri, 07 May 2004 12:54:26 GMT]]></title><description><![CDATA[<p>Unix-Tom schrieb:</p>
<blockquote>
<p>Versuche es mal mit<br />
ElementAt(i)</p>
</blockquote>
<p>Leider auch nicht. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/516006</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/516006</guid><dc:creator><![CDATA[Trikor]]></dc:creator><pubDate>Fri, 07 May 2004 12:54:26 GMT</pubDate></item><item><title><![CDATA[Reply to Zu blöd für CListCtrl? on Fri, 07 May 2004 13:44:29 GMT]]></title><description><![CDATA[<p>So, ich habe jetzt mal alles gelöscht, was irgendwie mit CListCtrl zu tun hat.<br />
Alles von Anfang an eingefügt und Ihr glaubt es kaum <strong>es funktioniert.</strong></p>
<p>Aber fragt mich bitte nicht, warum es vorher nicht lief. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /><br />
Keine Ahnung.</p>
<p>Trotzdem DANKE an alle, die mir helfen wollten. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/516048</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/516048</guid><dc:creator><![CDATA[Trikor]]></dc:creator><pubDate>Fri, 07 May 2004 13:44:29 GMT</pubDate></item></channel></rss>