Re: Help in opening templated CColorDialog
Hi,
As per your suggestion we use the CommDlgExtendedError function, the reurn
value
is CDERR_FINDRESFAILUR ,this is indicating some resource related problem but
everthing is done in the same way as we have done in CFileDiaolg
customization.So what exactly this error is indicating reagrding resources
failure we are still unable to recognize.
"Giovanni Dicanio" wrote:
"Parag Jhavery" <Parag Jhavery@discussions.microsoft.com> ha scritto nel
messaggio news:045F1C25-9AF2-432D-BBE0-8409B8FB4AA8@microsoft.com...
I am trying to open a customized CColorDialog with some additional buttons
placed on it.
I am following the example given by David Krunglinski in the book
Programming VC++.
[...]
CMyColorDialog::CMyColorDialog( COLORREF clrInit,DWORD dwFlags, CWnd*
pParentWnd):CColorDialog(clrInit,dwFlags,pParentWnd)
{
m_cc.hInstance = (HWND)AfxGetInstanceHandle();
m_cc.Flags |= CC_ENABLETEMPLATE;
m_cc.lpTemplateName = MAKEINTRESOURCE(IDD_DIALOG1);
}
[...]
I have no idea why this is not working for CColorDialog and is working for
CFileDialog?
I would suggest calling CommDlgExtendedError function to get some clue about
the reason of the failure:
http://msdn.microsoft.com/en-us/library/ms646916.aspx
Moreover, do you use DECLARE_DYNAMIC and IMPLEMENT_DYNAMIC correctly for
your CMyColorDialog class?
Giovanni
.