home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1999 January / dppcpro0199a.iso / January / Fp98 / SDK / WebBot / votebot / client / votebot.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1997-09-18  |  1.5 KB  |  63 lines

  1. //
  2. // Copyright (c) 1997 Microsoft Corp.  All Rights Reserved
  3. //
  4. // File: votebot.cpp
  5. // Defines the initialization routines for the DLL.
  6. //
  7.  
  8. #include "stdafx.h"
  9. #include "votebot.h"
  10. #include "VoteBotDialog.h"
  11. #include "../../webbot.h"
  12.  
  13. #ifdef _DEBUG
  14. #define new DEBUG_NEW
  15. #undef THIS_FILE
  16. static char THIS_FILE[] = __FILE__;
  17. #endif
  18.  
  19. /////////////////////////////////////////////////////////////////////////////
  20. // CvotebotApp
  21.  
  22. BEGIN_MESSAGE_MAP(CvotebotApp, CWinApp)
  23.     //{{AFX_MSG_MAP(CvotebotApp)
  24.         // NOTE - the ClassWizard will add and remove mapping macros here.
  25.         //    DO NOT EDIT what you see in these blocks of generated code!
  26.     //}}AFX_MSG_MAP
  27. END_MESSAGE_MAP()
  28.  
  29. /////////////////////////////////////////////////////////////////////////////
  30. // CvotebotApp construction
  31.  
  32. CvotebotApp::CvotebotApp()
  33. {
  34.     // TODO: add construction code here,
  35.     // Place all significant initialization in InitInstance
  36.  
  37. }
  38.  
  39. /////////////////////////////////////////////////////////////////////////////
  40. // The one and only CvotebotApp object
  41.  
  42. CvotebotApp theApp;
  43.  
  44.  
  45. BeginWebBotEdit(votebot, bot)
  46. {
  47.     // define the component editor dialog
  48.     CVoteBotDialog dlg;
  49.     
  50.     // get current bot values from dictionary 
  51.     dlg.DictionaryToDialog(bot);
  52.     
  53.     int nResponse = dlg.DoModal();
  54.     
  55.     // put new bot values back into dictionary
  56.     
  57.     dlg.DialogToDictionary(bot);
  58.     bot.SetValue("PREVIEW", "Voting Sample Component");
  59.     
  60.     return ( (dlg.m_bModified || dlg.m_bFirstEdit) && nResponse == IDOK);
  61. }
  62. EndWebBotEdit
  63.