<?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[neunes Fenster mit Splitter erstellen]]></title><description><![CDATA[<p>Hallo,<br />
ich habe eine leere SDI-Anwendung mit dem Assistent in visual studio 2005 erstellt.<br />
und möchte aus der SDI-Anwendung einen neunes Fenster wie popup öffnen</p>
<pre><code>void CMainFrame::OnCreateSplitterFrame()
{
   CSpiltter* pSplitterFrm = NULL;
   pSplitterFrm = new CSpiltter();
   if ( pSplitterFrm  )
   {
      CFrameWnd *pFrame = (CFrameWnd *)AfxGetApp()-&gt;m_pMainWnd;
      CRect rect ( 0, 0, 750, 400 );
      pSplitterFrm-&gt;Create( NULL, NULL,WS_OVERLAPPEDWINDOW |   WS_POPUP,rect,pFrame);
   }
}
</code></pre>
<p>dieses Fenster muss aus zwei Teilen bestehen<br />
habe ich versucht mit splitter zu realisieren</p>
<pre><code>BOOL CSpiltter::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) 
{
   CRect cr; 
   GetClientRect( &amp;cr);

   //teilen des Hauptfensters in 2 Zeilen
   if ( !m_mainSplitter.CreateStatic( this, 2, 1 ) ) 
   { 
      AfxMessageBox( _T(&quot;Error setting up splitter frames?&quot;), 
         MB_OK);
      return FALSE; 
   }

   if ( !m_mainSplitter.CreateView( 0, 0, 
      RUNTIME_CLASS(CSplitterView1), 
      CSize(cr.Width(), cr.Height()/4), pContext ) ) 
   { 
      AfxMessageBox( _T(&quot;Error setting up splitter frames!&quot;), MB_OK);
      return FALSE; 
   }
   if ( !m_mainSplitter.CreateView( 1, 0, 
      RUNTIME_CLASS(CSplitterView1), 
      CSize(0,0), pContext ) ) 
   { 
      AfxMessageBox( _T(&quot;Error setting up splitter frames!&quot;), MB_OK);
      return FALSE; 
   }

   m_bInitSplitter = true;
   return TRUE;
}
</code></pre>
<p>das View , das im ersten Teil angezeigt werden soll sieht so aus</p>
<pre><code>#pragma once
#include &quot;afxwin.h&quot;
#include &quot;gueltigkeitsbetstaetigungDoc.h&quot;

class CSplitterView1 :public CScrollView
{
   DECLARE_DYNCREATE(CSplitterView1)
public:
   CSplitterView1(void);
   ~CSplitterView1(void);

   // Überladungen
   // Vom Klassenassistenten generierte Überladungen virtueller Funktionen
   //{{AFX_VIRTUAL(CToolsView)
public:
   virtual BOOL PreCreateWindow(CREATESTRUCT&amp; cs);
protected:
   virtual void OnInitialUpdate(); // das erste mal nach der Konstruktion aufgerufen
   virtual void OnDraw(CDC*);
};
</code></pre>
<p>.</p>
<p>das Problem ist. es wird kein neues Fenster erstellt bzw angezeigt.<br />
was muss man besonders beachten.<br />
bitte helft mir. ich bin am zweifeln</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/186503/neunes-fenster-mit-splitter-erstellen</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Apr 2026 06:15:25 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/186503.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 09 Jul 2007 15:58:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to neunes Fenster mit Splitter erstellen on Mon, 09 Jul 2007 15:58:10 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich habe eine leere SDI-Anwendung mit dem Assistent in visual studio 2005 erstellt.<br />
und möchte aus der SDI-Anwendung einen neunes Fenster wie popup öffnen</p>
<pre><code>void CMainFrame::OnCreateSplitterFrame()
{
   CSpiltter* pSplitterFrm = NULL;
   pSplitterFrm = new CSpiltter();
   if ( pSplitterFrm  )
   {
      CFrameWnd *pFrame = (CFrameWnd *)AfxGetApp()-&gt;m_pMainWnd;
      CRect rect ( 0, 0, 750, 400 );
      pSplitterFrm-&gt;Create( NULL, NULL,WS_OVERLAPPEDWINDOW |   WS_POPUP,rect,pFrame);
   }
}
</code></pre>
<p>dieses Fenster muss aus zwei Teilen bestehen<br />
habe ich versucht mit splitter zu realisieren</p>
<pre><code>BOOL CSpiltter::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) 
{
   CRect cr; 
   GetClientRect( &amp;cr);

   //teilen des Hauptfensters in 2 Zeilen
   if ( !m_mainSplitter.CreateStatic( this, 2, 1 ) ) 
   { 
      AfxMessageBox( _T(&quot;Error setting up splitter frames?&quot;), 
         MB_OK);
      return FALSE; 
   }

   if ( !m_mainSplitter.CreateView( 0, 0, 
      RUNTIME_CLASS(CSplitterView1), 
      CSize(cr.Width(), cr.Height()/4), pContext ) ) 
   { 
      AfxMessageBox( _T(&quot;Error setting up splitter frames!&quot;), MB_OK);
      return FALSE; 
   }
   if ( !m_mainSplitter.CreateView( 1, 0, 
      RUNTIME_CLASS(CSplitterView1), 
      CSize(0,0), pContext ) ) 
   { 
      AfxMessageBox( _T(&quot;Error setting up splitter frames!&quot;), MB_OK);
      return FALSE; 
   }

   m_bInitSplitter = true;
   return TRUE;
}
</code></pre>
<p>das View , das im ersten Teil angezeigt werden soll sieht so aus</p>
<pre><code>#pragma once
#include &quot;afxwin.h&quot;
#include &quot;gueltigkeitsbetstaetigungDoc.h&quot;

class CSplitterView1 :public CScrollView
{
   DECLARE_DYNCREATE(CSplitterView1)
public:
   CSplitterView1(void);
   ~CSplitterView1(void);

   // Überladungen
   // Vom Klassenassistenten generierte Überladungen virtueller Funktionen
   //{{AFX_VIRTUAL(CToolsView)
public:
   virtual BOOL PreCreateWindow(CREATESTRUCT&amp; cs);
protected:
   virtual void OnInitialUpdate(); // das erste mal nach der Konstruktion aufgerufen
   virtual void OnDraw(CDC*);
};
</code></pre>
<p>.</p>
<p>das Problem ist. es wird kein neues Fenster erstellt bzw angezeigt.<br />
was muss man besonders beachten.<br />
bitte helft mir. ich bin am zweifeln</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1321670</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1321670</guid><dc:creator><![CDATA[jolay]]></dc:creator><pubDate>Mon, 09 Jul 2007 15:58:10 GMT</pubDate></item><item><title><![CDATA[Reply to neunes Fenster mit Splitter erstellen on Tue, 10 Jul 2007 06:47:50 GMT]]></title><description><![CDATA[<p>Das geht so nicht. Ein CSplitterWnd kann immer nur ein CHild Fenster sein. Will heißen es muss WS_CHILD gesetzt sein. Das wiederspricht aber Deinem Popup Gedanken!</p>
<p>Wieso möchtest Du ein neues Popup Window erzeugen? Welchen Sinn macht das?</p>
<p>Du kannst ein neues CFrameWnd erzeugen. In dem kannst Du dannn Dein CSplitterWnd erzeugen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1321957</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1321957</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Tue, 10 Jul 2007 06:47:50 GMT</pubDate></item><item><title><![CDATA[Reply to neunes Fenster mit Splitter erstellen on Tue, 10 Jul 2007 07:48:31 GMT]]></title><description><![CDATA[<p>hallo,<br />
sorry weil ich mich falsch ausgedruckt habe.<br />
genau was ich möchte ist ein CFrameWnd-Fenster aus meiner Anwendung zu erzeugen. In dem ich mit CSplitterWnd das Fenster in zwei Zeilen teile (horizental).<br />
in dem oberen Teil möchte ich einen Text ausgeben (Textview).<br />
in dem unteren Teil möchte ich auch Text ausgeben und Informationen zeichnen mit buttons(Formview)<br />
was muss ich in meinem Programm anpassen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1322003</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1322003</guid><dc:creator><![CDATA[jolay]]></dc:creator><pubDate>Tue, 10 Jul 2007 07:48:31 GMT</pubDate></item><item><title><![CDATA[Reply to neunes Fenster mit Splitter erstellen on Tue, 10 Jul 2007 07:53:06 GMT]]></title><description><![CDATA[<p>Das einfachste ist, Du lässt Dir mit dem Wizard mal ein SDI Projekt im Explorer-Stil erzeugen.</p>
<p>Ansonsten ist Dein Code doch soweit OK, wie ich das sehe. Nur die Funktion OnCreateSplitterFrame macht in meinen Augen keinen Sinn!</p>
<p>Die Größe des zweiten Splitter Windows ist auf 0. Vermutlich hängt der Splitter also am unteren Rand.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1322006</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1322006</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Tue, 10 Jul 2007 07:53:06 GMT</pubDate></item><item><title><![CDATA[Reply to neunes Fenster mit Splitter erstellen on Tue, 10 Jul 2007 08:22:06 GMT]]></title><description><![CDATA[<p>mit dem Wizard habe ich schon eine leere SDI MFC-Anwendung erzeugt. mit der Funktion OnCreateSplitterFrame möchte ich ein neues (zweites) CFrameWnd-Fenster erzeugen. dieses zweites Fenster und nicht das Fenster von meiner SDI-Anwendung möchte ich dann mit CSplitterWnd teilen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1322029</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1322029</guid><dc:creator><![CDATA[jolay]]></dc:creator><pubDate>Tue, 10 Jul 2007 08:22:06 GMT</pubDate></item><item><title><![CDATA[Reply to neunes Fenster mit Splitter erstellen on Tue, 10 Jul 2007 08:48:27 GMT]]></title><description><![CDATA[<p>OK! Sorry. Ich habe es jetzt erst gaz verstanden.</p>
<p>OnCreateSplitterFrame:<br />
Füge WS_VISIBLE als Stil hinzu oder führe ShowWindow(SW_SHOW) aus nachdem das Fenster erzeugt wurde.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1322051</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1322051</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Tue, 10 Jul 2007 08:48:27 GMT</pubDate></item><item><title><![CDATA[Reply to neunes Fenster mit Splitter erstellen on Tue, 10 Jul 2007 09:47:22 GMT]]></title><description><![CDATA[<p>wenn ich den Inhalt der Funktion CSpiltter::OnCreateClient auskommentiere, wird das zweites Fenster erzeugt und angezeigt. es liegt dann an der Splitterung</p>
<p>so erstelle jetzt das Fenster.</p>
<pre><code>void CMainFrame::OnCreateSplitterFrame()
{

   CSpiltter* pSplitterFrm = NULL;
   pSplitterFrm = new CSpiltter();
   if ( pSplitterFrm  )
   {
      CFrameWnd *pFrame = (CFrameWnd *)AfxGetApp()-&gt;m_pMainWnd;
      CRect rect ( 0, 0, 750, 400 );
      pSplitterFrm-&gt;[b]Create[/b]( pFrame);
   }

}
</code></pre>
<p>und</p>
<pre><code>BOOL CSpiltter::Create( CWnd *pParent)
{

 .......
........
  [b] BOOL ret = CFrameWnd :: Create ( NULL,
      csFehlerausgabeTitel,
      WS_OVERLAPPEDWINDOW ,
      rect,
      pParent ); // TODO[/b]   if ( ret == 0 )
   {
      return ret;  
   }

    ......
.......

   [b]ShowWindow ( SW_SHOW );[/b]
   return ret;  
}
</code></pre>
<pre><code>BOOL CSpiltter::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) 
{
   CRect cr; 
   GetClientRect( &amp;cr);

   //teilen des Hauptfensters in 2 Zeilen
   if ( !m_mainSplitter.CreateStatic( this, 2, 1 ) ) 
   { 
      AfxMessageBox( _T(&quot;Error setting up splitter frames?&quot;), 
         MB_OK);
      return FALSE; 
   }

   [b]// Sturtzt hier ab. es scheint etwas mit der View nicht in Ordnung zu sein[/b]   if ( !m_mainSplitter.CreateView( 0, 0, 
      RUNTIME_CLASS(CSplitterView1), 
      CSize(cr.Width(), cr.Height()/4), pContext ) ) 
   { 
      AfxMessageBox( _T(&quot;Error setting up splitter frames!&quot;), MB_OK);
      return FALSE; 
   }
   if ( !m_mainSplitter.CreateView( 1, 0, 
      RUNTIME_CLASS(CSplitterView1), 
      CSize(cr.Width(),cr.Height()*3/4), pContext ) ) 
   { 
      AfxMessageBox( _T(&quot;Error setting up splitter frames!&quot;), MB_OK);
      return FALSE; 
   }

   m_bInitSplitter = true;
   return TRUE;
}
</code></pre>
<p>bei der Spßlitterung sturtzt ab und zwar in der Stelle der MFC Klassen steht der Text<br />
// dialog template must exist and be invisible with WS_CHILD set</p>
<p>was mache ich noch falsch<br />
ich vermute dass es etwas in den View nicht stimmt</p>
<pre><code>#include &quot;StdAfx.h&quot;
#include &quot;SplitterView1.h&quot;

IMPLEMENT_DYNCREATE( CSplitterView1, CFormView )

CSplitterView1::CSplitterView1(void)
      : CFormView ( CSplitterView1 :: IDD )
{
}

CSplitterView1::~CSplitterView1(void)
{
}

void CSplitterView1::OnInitialUpdate()
{
  CFormView:: OnInitialUpdate ( );
}

BOOL CSplitterView1::PreCreateWindow(CREATESTRUCT&amp; cs) 
{ 
   return CFormView::PreCreateWindow(cs);
}

void CSplitterView1::OnDraw(CDC* cdc)
{
   //CScrollView::OnDraw(cdc);

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1322118</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1322118</guid><dc:creator><![CDATA[jolay]]></dc:creator><pubDate>Tue, 10 Jul 2007 09:47:22 GMT</pubDate></item><item><title><![CDATA[Reply to neunes Fenster mit Splitter erstellen on Tue, 10 Jul 2007 10:48:56 GMT]]></title><description><![CDATA[<p>Steht doch da!<br />
Dein Dialog Template hat nicht das Attribut WS_CHILD (Kindfenster).<br />
Oder es existiert nicht, also was ist als CSplitterView1::IDD definiert?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1322172</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1322172</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Tue, 10 Jul 2007 10:48:56 GMT</pubDate></item><item><title><![CDATA[Reply to neunes Fenster mit Splitter erstellen on Tue, 10 Jul 2007 11:06:03 GMT]]></title><description><![CDATA[<p>das wars. habe ich mir auch so gedacht aber ich wusste nicht welchen Attributte.<br />
du hast Recht. mein IDD-Dialog attributte stil muss auf &quot;Untergeordnet&quot; stehen.<br />
ist das irgendwo dokumentiert !<br />
danke dir vielmals dür dein Geduld und deine Hilfe. jetzt kann ich mal weiter kooken wie ich auf meine Fenster zeichne.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1322186</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1322186</guid><dc:creator><![CDATA[jolay]]></dc:creator><pubDate>Tue, 10 Jul 2007 11:06:03 GMT</pubDate></item><item><title><![CDATA[Reply to neunes Fenster mit Splitter erstellen on Tue, 10 Jul 2007 11:28:00 GMT]]></title><description><![CDATA[<p>jolay schrieb:</p>
<blockquote>
<p>du hast Recht. mein IDD-Dialog attributte stil muss auf &quot;Untergeordnet&quot; stehen.<br />
ist das irgendwo dokumentiert !</p>
</blockquote>
<p>Jupp! Wie so immer steht zu 95% aller Fragen dieAntwortin der MFC:<br />
<a href="http://msdn2.microsoft.com/en-us/library/1k26hkc2(vs.80).aspx" rel="nofollow">http://msdn2.microsoft.com/en-us/library/1k26hkc2(vs.80).aspx</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1322205</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1322205</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Tue, 10 Jul 2007 11:28:00 GMT</pubDate></item></channel></rss>