<?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[CControlBar]]></title><description><![CDATA[<p>Hallo, also ich habe folgendes problem ich habe eine Klasse von CControlBar abgeleitet und in der OnNcCalcSize methode die größe das Clientbereichs geändert. Das Klappt alles solange die ControlBar angedockt is an eine der Seiten aba solbald sie Float is dann kann ich den ClientBereich net mehr bestimmen. Wieso net???<br />
Hier mein Code:</p>
<pre><code class="language-cpp">GetWindowRect(m_rectBorder);
    m_rectBorder = CRect(0, 0, m_rectBorder.Width(), m_rectBorder.Height());
	DWORD dwBorderStyle = m_dwStyle | CBRS_BORDER_ANY;
	if(IsFloating())
	{
		m_rectBorder.SetRectEmpty();
		lpncsp-&gt;rgrc[0].left+=2;
		lpncsp-&gt;rgrc[0].right-=2;
		lpncsp-&gt;rgrc[0].top+=2;
		lpncsp-&gt;rgrc[0].bottom-=2;
	}
	else
	{
		switch(m_nDockBarID)
		{
			case AFX_IDW_DOCKBAR_TOP:
				dwBorderStyle &amp;= ~CBRS_BORDER_BOTTOM;
				m_pDockSize.cy = CaptionHeight;
				lpncsp-&gt;rgrc[0].left+=2;
				lpncsp-&gt;rgrc[0].right-=2;
				lpncsp-&gt;rgrc[0].top+=2;
				lpncsp-&gt;rgrc[0].bottom-=2;
				break;
			case AFX_IDW_DOCKBAR_BOTTOM:
				dwBorderStyle &amp;= ~CBRS_BORDER_TOP;
				m_pDockSize.cy = CaptionHeight;
				lpncsp-&gt;rgrc[0].left+=2;
				lpncsp-&gt;rgrc[0].right-=2;
				lpncsp-&gt;rgrc[0].top+=2;
				lpncsp-&gt;rgrc[0].bottom-=2;
				break;
			case AFX_IDW_DOCKBAR_LEFT:		
				dwBorderStyle &amp;= ~CBRS_BORDER_RIGHT;
				m_pDockSize.cx = CaptionHeight;
				lpncsp-&gt;rgrc[0].left+=2;
				lpncsp-&gt;rgrc[0].right-=2;
				lpncsp-&gt;rgrc[0].top+=2;
				lpncsp-&gt;rgrc[0].bottom-=6;
				break;
			case AFX_IDW_DOCKBAR_RIGHT:
				dwBorderStyle &amp;= ~CBRS_BORDER_LEFT;
				m_pDockSize.cx = CaptionHeight;
				lpncsp-&gt;rgrc[0].left+=2;
				lpncsp-&gt;rgrc[0].right-=2;
				lpncsp-&gt;rgrc[0].top+=2;
				lpncsp-&gt;rgrc[0].bottom-=6;
				break;
		}
	}
	SetBarStyle(dwBorderStyle);
	CControlBar::OnNcCalcSize(bCalcValidRects, lpncsp);
</code></pre>
<p>Vielen dank für jede antwort im voraus.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/142120/ccontrolbar</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Jul 2026 04:35:29 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/142120.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 27 Mar 2006 21:57:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CControlBar on Mon, 27 Mar 2006 21:57:27 GMT]]></title><description><![CDATA[<p>Hallo, also ich habe folgendes problem ich habe eine Klasse von CControlBar abgeleitet und in der OnNcCalcSize methode die größe das Clientbereichs geändert. Das Klappt alles solange die ControlBar angedockt is an eine der Seiten aba solbald sie Float is dann kann ich den ClientBereich net mehr bestimmen. Wieso net???<br />
Hier mein Code:</p>
<pre><code class="language-cpp">GetWindowRect(m_rectBorder);
    m_rectBorder = CRect(0, 0, m_rectBorder.Width(), m_rectBorder.Height());
	DWORD dwBorderStyle = m_dwStyle | CBRS_BORDER_ANY;
	if(IsFloating())
	{
		m_rectBorder.SetRectEmpty();
		lpncsp-&gt;rgrc[0].left+=2;
		lpncsp-&gt;rgrc[0].right-=2;
		lpncsp-&gt;rgrc[0].top+=2;
		lpncsp-&gt;rgrc[0].bottom-=2;
	}
	else
	{
		switch(m_nDockBarID)
		{
			case AFX_IDW_DOCKBAR_TOP:
				dwBorderStyle &amp;= ~CBRS_BORDER_BOTTOM;
				m_pDockSize.cy = CaptionHeight;
				lpncsp-&gt;rgrc[0].left+=2;
				lpncsp-&gt;rgrc[0].right-=2;
				lpncsp-&gt;rgrc[0].top+=2;
				lpncsp-&gt;rgrc[0].bottom-=2;
				break;
			case AFX_IDW_DOCKBAR_BOTTOM:
				dwBorderStyle &amp;= ~CBRS_BORDER_TOP;
				m_pDockSize.cy = CaptionHeight;
				lpncsp-&gt;rgrc[0].left+=2;
				lpncsp-&gt;rgrc[0].right-=2;
				lpncsp-&gt;rgrc[0].top+=2;
				lpncsp-&gt;rgrc[0].bottom-=2;
				break;
			case AFX_IDW_DOCKBAR_LEFT:		
				dwBorderStyle &amp;= ~CBRS_BORDER_RIGHT;
				m_pDockSize.cx = CaptionHeight;
				lpncsp-&gt;rgrc[0].left+=2;
				lpncsp-&gt;rgrc[0].right-=2;
				lpncsp-&gt;rgrc[0].top+=2;
				lpncsp-&gt;rgrc[0].bottom-=6;
				break;
			case AFX_IDW_DOCKBAR_RIGHT:
				dwBorderStyle &amp;= ~CBRS_BORDER_LEFT;
				m_pDockSize.cx = CaptionHeight;
				lpncsp-&gt;rgrc[0].left+=2;
				lpncsp-&gt;rgrc[0].right-=2;
				lpncsp-&gt;rgrc[0].top+=2;
				lpncsp-&gt;rgrc[0].bottom-=6;
				break;
		}
	}
	SetBarStyle(dwBorderStyle);
	CControlBar::OnNcCalcSize(bCalcValidRects, lpncsp);
</code></pre>
<p>Vielen dank für jede antwort im voraus.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1025169</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1025169</guid><dc:creator><![CDATA[xyz44]]></dc:creator><pubDate>Mon, 27 Mar 2006 21:57:27 GMT</pubDate></item></channel></rss>