Hello,
MSDN contains an example for creating a desktop alert window: http://msdn.microsoft.com/en-us/library/bb983515.aspx
The sample code starts with the following declaration.
CMFCDesktopAlertWnd* pPopup = new CMFCDesktopAlertWnd;
When I use it in my code, the compiler complains
'CMFCDesktopAlertWnd' : no appropriate default constructor available
This is the complete source code of my application. (I created an empty Win32 project in Visual Studio and set the Use MFC in a Shared DLL option on the Property | General page.)
#include <afxwin.h>
#include <afxDesktopAlertDialog.h>
class Notifier : public CWinApp
{
public:
virtual BOOL InitInstance();
};
BOOL Notifier::InitInstance()
{
CMFCDesktopAlertWnd* pPopup = new CMFCDesktopAlertWnd;
return TRUE;
}
Notifier myApp;
What am I doing wrong? The effect is the same in VS Express 2008 and the full version of VS 2010.