Dialog box does not display

Hi,

I'm implementing an About dialog box that is generated from a IE
specific toolbar addin. The resource file looks like this:

/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//

IDD_ABOUTDLG DIALOGEX 0, 0, 186, 95
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_TRANSPARENT
CAPTION "About the toolbar"
FONT 8, "MS Sans Serif"
BEGIN
    DEFPUSHBUTTON   "OK",1,61,56,50,14
    GROUPBOX        "",IDC_STATIC,5,2,174,86,BS_CENTER | BS_FLAT
    CTEXT           "\nWish this worked",
                    IDC_STATIC,12,13,160,63,SS_SUNKEN | WS_BORDER,
                    WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE
END

//////////////
I've used the ATL Wizard to generate the
dialog resource as follows:

// AboutDlg.h : Declaration of the CAboutDlg

#ifndef __ABOUTDLG_H_
#define __ABOUTDLG_H_

//commented this out #include <windows.h>
#include "resource.h"       // main symbols
#include <atlhost.h>

/////////////////////////////////////////////////////////////////////////////
// CAboutDlg
class CAboutDlg :
     public CDialogImpl <CAboutDlg> //modified this to CWindow from
CAboutDlg
{
     

public:
     CAboutDlg(){};
     virtual ~CAboutDlg(){};

     
     enum { IDD = IDD_ABOUTDLG };

BEGIN_MSG_MAP(AboutDlg)
     MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
     
     COMMAND_ID_HANDLER(IDOK, OnOK)

END_MSG_MAP()
//LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL&
bHandled);
//LRESULT OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL&
bHandled);
// Handler prototypes:
//LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam,
BOOL& bHandled);
//  LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl,
BOOL& bHandled);
//  LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
     


     LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL&
bHandled)
     {          
                   
          MessageBox(_T("The About Dialog Box has been invoked"), _T("About
Dialog Message Box"), MB_OK);
          MessageBox("I am here", "", MB_OK);
         

          return 1;   //let the system set the focus
           
     }


     LRESULT OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL&
bHandled)
     {
          EndDialog(wID);
          return 0;
     }

};

#endif //__ABOUTDLG_H_

I then called this class as follows:

CAboutDlg about;
about.DoModal();


The application compiles and runs, (the message boxes display as well), however the About dialog does not
display the IDD_ABOUTDLG resource in the background - the part of the
webpage that is meant to be covered by the About dialog appears
instead.

I'm really puzzled by this issue and am wondering if anyone
has run into this issue before? How did you solve it?

Any advice would be appreciated,
Suni
stitch2802Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jaime OlivaresSoftware ArchitectCommented:
I don't see a WS_VISIBLE style in your dialog resource, also try to remove the DS_ like styles
0
stitch2802Author Commented:
After adding the WS_VISIBLE option to my resource file and removing the DS_3DLOOK option as you suggested, the dialog box still did not display.

Any further suggestions? =)
0
Jaime OlivaresSoftware ArchitectCommented:
your dialog constructor must be something like:
 CAboutDlg() : : CDialog(CAboutDlg::IDD, NULL)
{

};
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

stitch2802Author Commented:
Jaime,

Thank you for your quick response. I'm using ATL instead of MFC  to create a modal dialog box.

Will your suggestion still be applicable? Please let me know.

Thanks,
S/.
0
stitch2802Author Commented:
This is what MSDN had to say about it:

To create a modal dialog box, create an instance of your CDialogImpl-derived (or CAxDialogImpl-derived) class and then call the DoModal method.

Which was exactly what I did...

0
moduloCommented:
Closed, 500 points refunded.

modulo
Community Support Moderator
Experts Exchange
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.