<?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[CommonDialog wird nicht aufgerufen]]></title><description><![CDATA[<p>Ich benutze die Klasse 'CPropertyList' (zu finden auf codeproject_de).</p>
<p>Aus diesem Control heraus rufe ich den 'CColorDialog'-Dialog auf wenn ich auf ein, im Control befindliches Button, klicke. Das hat bisher immer geklappt, nur dieses Mal nicht !?</p>
<p>Es kann definitiv nicht an eventuellen Programmierfehlern der PropertyList liegen.</p>
<p>Zu meinem Dialogfeld, welches die <em>fehlerhafte</em> PropertyList benutzt:<br />
- Das Dialogfeld wird modal erzeugt<br />
- Das ganze Programm befindet sich nicht in einer DLL, noch benutzt es eine<br />
- MFC wird in statischer Bibliothek verwendet<br />
- Laufzeitbibliothek: Multithreaded (/MT)</p>
<p>Fehlerbeschreibung:<br />
- Bei Aufruf des FontDialog sagt der debuger liegt das Problem in CFontDialog::FillInLogFont()<br />
- Bei Aufruf des ColorDialog bleibt das Programm anscheinend in einer <em>while(TRUE)</em> oder Ähnlichem hängen</p>
<p>Ich habe absolut keine Ahnung wo ich den Fehler suchen soll !?</p>
<p>Hoffe das Ihr mir hier weiterhelfen könnt.</p>
<p>Mfg<br />
Marco</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/194481/commondialog-wird-nicht-aufgerufen</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 01:04:13 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/194481.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 07 Oct 2007 15:42:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CommonDialog wird nicht aufgerufen on Sun, 07 Oct 2007 15:42:45 GMT]]></title><description><![CDATA[<p>Ich benutze die Klasse 'CPropertyList' (zu finden auf codeproject_de).</p>
<p>Aus diesem Control heraus rufe ich den 'CColorDialog'-Dialog auf wenn ich auf ein, im Control befindliches Button, klicke. Das hat bisher immer geklappt, nur dieses Mal nicht !?</p>
<p>Es kann definitiv nicht an eventuellen Programmierfehlern der PropertyList liegen.</p>
<p>Zu meinem Dialogfeld, welches die <em>fehlerhafte</em> PropertyList benutzt:<br />
- Das Dialogfeld wird modal erzeugt<br />
- Das ganze Programm befindet sich nicht in einer DLL, noch benutzt es eine<br />
- MFC wird in statischer Bibliothek verwendet<br />
- Laufzeitbibliothek: Multithreaded (/MT)</p>
<p>Fehlerbeschreibung:<br />
- Bei Aufruf des FontDialog sagt der debuger liegt das Problem in CFontDialog::FillInLogFont()<br />
- Bei Aufruf des ColorDialog bleibt das Programm anscheinend in einer <em>while(TRUE)</em> oder Ähnlichem hängen</p>
<p>Ich habe absolut keine Ahnung wo ich den Fehler suchen soll !?</p>
<p>Hoffe das Ihr mir hier weiterhelfen könnt.</p>
<p>Mfg<br />
Marco</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1379793</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1379793</guid><dc:creator><![CDATA[Red Skall]]></dc:creator><pubDate>Sun, 07 Oct 2007 15:42:45 GMT</pubDate></item><item><title><![CDATA[Reply to CommonDialog wird nicht aufgerufen on Mon, 08 Oct 2007 05:40:16 GMT]]></title><description><![CDATA[<p>Der Fehler tritt nicht nur in der PropertyList auf, sondern auch in allen anderen getesteten Controls und im Hauptdialogfeld.</p>
<p>Komischer weise kann ich innerhalb 'OnInitDialog()' des Dialogfeldes alle Dialoge aufrufen. Sobald es initialisiert wurde, und ich den ColorDialog zum Bsp. in 'OnHelpInfo()' aufrufe, tritt der Fehler auf.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1380192</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1380192</guid><dc:creator><![CDATA[Red Skall]]></dc:creator><pubDate>Mon, 08 Oct 2007 05:40:16 GMT</pubDate></item><item><title><![CDATA[Reply to CommonDialog wird nicht aufgerufen on Mon, 08 Oct 2007 06:40:16 GMT]]></title><description><![CDATA[<p>Und was sagen die Rückgabewerte?<br />
CommDlgExtendedError etc?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1380215</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1380215</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Mon, 08 Oct 2007 06:40:16 GMT</pubDate></item><item><title><![CDATA[Reply to CommonDialog wird nicht aufgerufen on Mon, 08 Oct 2007 11:58:27 GMT]]></title><description><![CDATA[<p>Das kann ich leider nicht testen, da das Programm innerhalb DoModal() des CommonDlg abstürzt. An den Rückgabewert komme ich nicht dran <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1380424</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1380424</guid><dc:creator><![CDATA[Red Skall]]></dc:creator><pubDate>Mon, 08 Oct 2007 11:58:27 GMT</pubDate></item><item><title><![CDATA[Reply to CommonDialog wird nicht aufgerufen on Mon, 08 Oct 2007 18:40:13 GMT]]></title><description><![CDATA[<p>Was sagt der Callstack wenn es crasht. Welcher Code von Dir ist noch im Spiel?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1380740</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1380740</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Mon, 08 Oct 2007 18:40:13 GMT</pubDate></item><item><title><![CDATA[Reply to CommonDialog wird nicht aufgerufen on Mon, 08 Oct 2007 18:59:37 GMT]]></title><description><![CDATA[<p>Beim ColorDialog sagt der CallStack:</p>
<pre><code>DWORD CFontDialog::FillInLogFont(const CHARFORMAT&amp; cf)
{
	USES_CONVERSION;

	DWORD dwFlags = 0;
	[b]BOOL bIsFormat2 = (cf.cbSize &gt;= sizeof(CHARFORMAT2))[/b];

	if (cf.dwMask &amp; CFM_SIZE)
	{
</code></pre>
<p>Der Fehler ist in der fetten Zeile (Zeile 123, dlgfnt.cpp)</p>
<p>Den ColorDialog kann ich nicht testen, da dort ja nur nen Stapelüberlauf ausgelöst wird und er nicht richtig abstürzt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1380756</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1380756</guid><dc:creator><![CDATA[Red Skall]]></dc:creator><pubDate>Mon, 08 Oct 2007 18:59:37 GMT</pubDate></item><item><title><![CDATA[Reply to CommonDialog wird nicht aufgerufen on Tue, 09 Oct 2007 07:13:59 GMT]]></title><description><![CDATA[<p>Und was sagt der this Pointer an der Stelle? Ist this etwa NULL?</p>
<p>BTW: Das ist nicht der Callstack. Ich meine den gesamten Aufrufs Stack, der zum Fehler führt. Es kann ja sehr gut eine Funktion darunter sein, die den Fehler auslöst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1380977</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1380977</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Tue, 09 Oct 2007 07:13:59 GMT</pubDate></item><item><title><![CDATA[Reply to CommonDialog wird nicht aufgerufen on Tue, 09 Oct 2007 17:12:52 GMT]]></title><description><![CDATA[<p>sorry, dachte dir würde der ferhlerpunkt reinchen, hier der callstack:</p>
<pre><code>&gt;	Printlist Generator.exe!CFontDialog::FillInLogFont(const _charformat &amp; cf={...})  Zeile 123 + 0x3	C++
 	Printlist Generator.exe!CFontDialog::CFontDialog(const _charformat &amp; charformat={...}, unsigned long dwFlags=257, CDC * pdcPrinter=0x00000000, CWnd * pParentWnd=0x00a7930c)  Zeile 69 + 0xc	C++
 	Printlist Generator.exe!CPropertyList::OnButton()  Zeile 497 + 0x1d	C++
 	Printlist Generator.exe!_AfxDispatchCmdMsg(CCmdTarget * pTarget=0x00a7930c, unsigned int nID=714, int nCode=0, void (void)* pfn=0x0041a200, void * pExtra=0x00000000, unsigned int nSig=53, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000)  Zeile 89	C++
 	Printlist Generator.exe!CCmdTarget::OnCmdMsg(unsigned int nID=714, int nCode=0, void * pExtra=0x00000000, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000)  Zeile 396 + 0x27	C++
 	Printlist Generator.exe!CWnd::OnCommand(unsigned int wParam=714, long lParam=67346)  Zeile 2550	C++
 	Printlist Generator.exe!CWnd::OnWndMsg(unsigned int message=273, unsigned int wParam=714, long lParam=67346, long * pResult=0x0012e68c)  Zeile 1759 + 0x1c	C++
 	Printlist Generator.exe!CWnd::WindowProc(unsigned int message=273, unsigned int wParam=714, long lParam=67346)  Zeile 1745 + 0x1e	C++
 	Printlist Generator.exe!AfxCallWndProc(CWnd * pWnd=0x00a7930c, HWND__ * hWnd=0x00010704, unsigned int nMsg=273, unsigned int wParam=714, long lParam=67346)  Zeile 241 + 0x1a	C++
 	Printlist Generator.exe!AfxWndProc(HWND__ * hWnd=0x00010704, unsigned int nMsg=273, unsigned int wParam=714, long lParam=67346)  Zeile 389	C++
</code></pre>
<p>der this pointer ist ok.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1381496</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1381496</guid><dc:creator><![CDATA[Red Skall]]></dc:creator><pubDate>Tue, 09 Oct 2007 17:12:52 GMT</pubDate></item><item><title><![CDATA[Reply to CommonDialog wird nicht aufgerufen on Wed, 10 Oct 2007 18:18:07 GMT]]></title><description><![CDATA[<p>hat mit der auslastung hat sich geklärt. ist aber unerheblich. das problem mit dem FontDialog besteht aber weiterhin und ist auch unverändert -.-</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1382312</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1382312</guid><dc:creator><![CDATA[RedSkall_away]]></dc:creator><pubDate>Wed, 10 Oct 2007 18:18:07 GMT</pubDate></item><item><title><![CDATA[Reply to CommonDialog wird nicht aufgerufen on Wed, 10 Oct 2007 19:10:36 GMT]]></title><description><![CDATA[<p>Zeig mal den Code in OnButton!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1382356</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1382356</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Wed, 10 Oct 2007 19:10:36 GMT</pubDate></item><item><title><![CDATA[Reply to CommonDialog wird nicht aufgerufen on Wed, 10 Oct 2007 20:02:02 GMT]]></title><description><![CDATA[<pre><code>void CPropertyList::OnButton()
{
	CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel);

	//display the appropriate common dialog depending on what type
	//of chooser is associated with the property
	if (pItem-&gt;m_nItemType == PIT_COLOR)
	{
		CColorDialog ClrDlg(pItem-&gt;cClrValue, CC_FULLOPEN);

		if (IDOK == ClrDlg.DoModal())
		{
			m_btnCtrl.ShowWindow(SW_HIDE);

			pItem-&gt;cClrValue = ClrDlg.GetColor();
			Invalidate();
		}
	}
	else if (pItem-&gt;m_nItemType == PIT_FILE)
	{
		CString SelectedFile; 
		CString Filter(&quot;Gif Files (*.gif)|*.gif||&quot;);

		CFileDialog FileDlg(TRUE, NULL, NULL, NULL,
			Filter);

		CString currPath = pItem-&gt;m_cCurValue;
		FileDlg.m_ofn.lpstrTitle = &quot;Select file&quot;;
		if (currPath.GetLength() &gt; 0)
			FileDlg.m_ofn.lpstrInitialDir = currPath.Left(
				currPath.GetLength() - currPath.ReverseFind('\\'));

		if(IDOK == FileDlg.DoModal())
		{
			SelectedFile = FileDlg.GetPathName();

			m_btnCtrl.ShowWindow(SW_HIDE);

			pItem-&gt;m_cCurValue = SelectedFile;
			Invalidate();
		}
	}
	else if (pItem-&gt;m_nItemType == PIT_FONT)
	{	
		CHARFORMAT *cFormatTmp;

		if (pItem-&gt;vValue != NULL)
			cFormatTmp = (CHARFORMAT*) pItem-&gt;vValue;
		else
			cFormatTmp = NULL;

		CFontDialog FontDlg(*cFormatTmp, CF_EFFECTS | CF_SCREENFONTS, NULL, this);

		if(IDOK == FontDlg.DoModal())
		{
			pItem-&gt;m_cCurValue = FontDlg.GetFaceName();

			if (pItem-&gt;vValue != NULL)
			{
				CHARFORMAT cFormat, *cFormatRef;

				FontDlg.GetCharFormat(cFormat);

				cFormatRef	= (CHARFORMAT*) pItem-&gt;vValue;
				*cFormatRef	= cFormat;
			}

			m_btnCtrl.ShowWindow(SW_HIDE);

			Invalidate();
		}
	}
}
</code></pre>
<p>je nach itemtyp wird der entsprechende dialog aufgerufen. der code funktioniert ja sonst einwandfrei. ich kann nur nicht sagen was an meiner anwendung / dialogfeld anders ist !?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1382388</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1382388</guid><dc:creator><![CDATA[Red Skall]]></dc:creator><pubDate>Wed, 10 Oct 2007 20:02:02 GMT</pubDate></item></channel></rss>