as mentioned in the latest MSDN which we are refering currently .
CColorDialog that we are looking for.
"Joseph M. Newcomer" wrote:
Which OS is described in the book, and which OS are you using? There were signficant
changes to these mechanisms with Vista, for example, obsoleting all previous
documentation. I think there were also changes with XP, but I wasn't doing it in XP so
I've forgotten what the issues were.
Note that the requirements about borders, etc. for the dialogs are essential. Some
earlier operating systems accepted non-conforming dialog templates, but later ones
rejected them. Show us the actual template information from the .rc file (we don't need
the controls, just the DIALOG/DIALOGEX declaration)
Note that you should never, ever had a dialog called IDD_DIALOG1. These nonsensical names
are assigned by the dialog editor, but the very first thing you want to do is change them
to usefule names; this should be called something sensible, for example,
IDD_MY_COLOR_FEATURES or some other name that makes sense in your app.
joe
****
On Thu, 10 Dec 2009 05:46:02 -0800, Parag Jhavery <Parag
Jhavery@discussions.microsoft.com> wrote:
Hi,
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++.
I have derived CColorDialog and in the constructor of the derived class I am
providing the following intializations -
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 want the IDD_DIALOG1 to be displayed with the CColorDialog is shown. For
this I have also used a static group with id stc32 as suggested in the book.
However, this does not show the dialog at all. For CFileDialog the same
procedure is working fine.
Also the MSDN suggest that it is possible to open a templatized CColorDialog?
I have no idea why this is not working for CColorDialog and is working for
CFileDialog?
Any help is highly appreciated.
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.