Exception within ATL when creating dialog

Hello,

Sorry if I'm bothering too much. I've gotten great help from here before.

Here's the situation. I'm using Visual C++ 6.0. Within my IShellView I have a memberpointer to a dialog class that implements the CAxDialogImpl dialog. When the view loads I create this dialog dynamically by these lines:

 m_pDialog = new CIsdSpreadDialog;
 m_pDialog->Create(m_hWnd);
 m_pDialog->ModifyStyle(WS_DLGFRAME | WS_BORDER | WS_THICKFRAME, WS_HSCROLL | WS_VSCROLL | WS_CLIPSIBLINGS );
 m_pDialog->SetParent(m_hWnd);

The problem is that in the Create function which calls AtlAxCreateDialog an exception in thrown in atlhost.h line 2446 which looks like this:

  hWnd = ::CreateDialogIndirectParamA(hInstance, lpDialogTemplate, hWndParent, lpDialogProc, dwInitParam);

The exceptions come out like this:

ATL: IOleClientSite::ShowObject
First-chance exception in explorer.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.
First-chance exception in explorer.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.

The only things on the dialog are 2 buttons and a farpoint spread60 control.

Hmm the exception doesn't occur without the spread control on it. I suppose you can't help then. Maybe you have an idea what can cause the spread to cause that exception




Answer this question

Exception within ATL when creating dialog

  • Ron Carr

    Okay. I already have later versions. Using 6.0 was a customer request unfortunately.

  • Dennis Gray

    Thesee forums are specific for VC2005. Please use the newsgroups at http://msdn.microsoft.com/newsgroups/ for such issues.

    BTW, I would really recommend upgrading to later versions since the official support for VC6.0 already expired.

    Thanks,
    Ayman Shoukry
    VC++ Team


  • Exception within ATL when creating dialog