home *** CD-ROM | disk | FTP | other *** search
- //
- // Copyright (c) 1997 Microsoft Corp. All Rights Reserved
- //
- // File: votebot.cpp
- // Defines the initialization routines for the DLL.
- //
-
- #include "stdafx.h"
- #include "votebot.h"
- #include "VoteBotDialog.h"
- #include "../../webbot.h"
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CvotebotApp
-
- BEGIN_MESSAGE_MAP(CvotebotApp, CWinApp)
- //{{AFX_MSG_MAP(CvotebotApp)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- // DO NOT EDIT what you see in these blocks of generated code!
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
- // CvotebotApp construction
-
- CvotebotApp::CvotebotApp()
- {
- // TODO: add construction code here,
- // Place all significant initialization in InitInstance
-
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // The one and only CvotebotApp object
-
- CvotebotApp theApp;
-
-
- BeginWebBotEdit(votebot, bot)
- {
- // define the component editor dialog
- CVoteBotDialog dlg;
-
- // get current bot values from dictionary
- dlg.DictionaryToDialog(bot);
-
- int nResponse = dlg.DoModal();
-
- // put new bot values back into dictionary
-
- dlg.DialogToDictionary(bot);
- bot.SetValue("PREVIEW", "Voting Sample Component");
-
- return ( (dlg.m_bModified || dlg.m_bFirstEdit) && nResponse == IDOK);
- }
- EndWebBotEdit
-