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

  1. //
  2. // Copyright (c) 1996 Vermeer Technologies, Inc., a wholly owned
  3. //               subsidiary of Microsoft Corp.  All Rights Reserved
  4. //
  5. // File: simple.cpp
  6. // Defines the initialization routines for the DLL.
  7. //
  8.  
  9. #include "stdafx.h"
  10. #include "simple.h"
  11. #include "simpledialog.h"
  12. #include "../webbot.h"
  13.  
  14. #ifdef _DEBUG
  15. #define new DEBUG_NEW
  16. #undef THIS_FILE
  17. static char THIS_FILE[] = __FILE__;
  18. #endif
  19.  
  20. /////////////////////////////////////////////////////////////////////////////
  21. // CSimpleApp
  22.  
  23. BEGIN_MESSAGE_MAP(CSimpleApp, CWinApp)
  24.     //{{AFX_MSG_MAP(CSimpleApp)
  25.         // NOTE - the ClassWizard will add and remove mapping macros here.
  26.         //    DO NOT EDIT what you see in these blocks of generated code!
  27.     //}}AFX_MSG_MAP
  28. END_MESSAGE_MAP()
  29.  
  30. /////////////////////////////////////////////////////////////////////////////
  31. // CSimpleApp construction
  32.  
  33. CSimpleApp::CSimpleApp()
  34. {
  35.     // TODO: add construction code here,
  36.     // Place all significant initialization in InitInstance
  37. }
  38.  
  39. /////////////////////////////////////////////////////////////////////////////
  40. // The one and only CSimpleApp object
  41.  
  42. CSimpleApp theApp;
  43.  
  44. BeginWebBotExpand(simple,ret,botAttribs,cgi,form)
  45. {
  46.     ret.Append(botAttribs.GetValue("ExpandTo"));
  47. }
  48. EndWebBotExpand
  49.  
  50.  
  51.  
  52. BeginWebBotEdit(simple, botAttribs)
  53. {
  54.     CSimpleDialog dlg;
  55.     dlg.m_edit = botAttribs.GetValue("PREVIEW");
  56.     int nResponse = dlg.DoModal();
  57.     botAttribs.SetValue("ExpandTo", dlg.m_edit);
  58.     botAttribs.SetValue("PREVIEW", dlg.m_edit);
  59.     return (nResponse == IDOK);
  60. }
  61. EndWebBotEdit
  62.