The Mudcat Café TM
Thread #140710   Message #3235153
Posted By: JohnInKansas
06-Oct-11 - 11:34 PM
Thread Name: Tech: A BHO named TODO
Subject: RE: Tech: A BHO named TODO
A sample of where the TODO comes from, although not really how it all happens, can be viewed at How to write a BHO
This page gives "sample code" anyone can copy and paste into their "design." Only fragments are here, and they had to be htmlized since the 'cat doesn't like tabs. Get the original if you want to use it. No guarantees about the code, as it's a "random pick."

A line that begins with "//" is "commented out" and should be ignored by any program that "runs" the code. Some other sites aren't as careful about the notation.

Note lines 24, 47, 52, 61.

From: www.pudn.com > BHO_enum.rar > BHO.cpp, change:2007-05-09,size:2221b
1    // BHO.cpp : Defines the class behaviors for the application.
2    //
3    #include "stdafx.h"
4    #include "BHO.h"
5    #include "BHODlg.h"
6    #ifdef _DEBUG
7    #define new DEBUG_NEW
8    #undef THIS_FILE
9    static char THIS_FILE[] = __FILE__;
10    #endif
11    /////////////////////////////////////////////////////////////////////////////
12    // CBHOApp
13    BEGIN_MESSAGE_MAP(CBHOApp, CWinApp)
14    //{{AFX_MSG_MAP(CBHOApp)
15    // NOTE - the ClassWizard will add and remove mapping macros here.
16    // DO NOT EDIT what you see in these blocks of generated code!
17    //}}AFX_MSG
18    ON_COMMAND(ID_HELP, CWinApp::OnHelp)
19    END_MESSAGE_MAP()
20    /////////////////////////////////////////////////////////////////////////////
21    // CBHOApp construction
22    CBHOApp::CBHOApp()
23    {
24    // TODO: add construction code here,
25    // Place all significant initialization in InitInstance
26    }
27    //////////////////////////////////////////////////////////////////////////

… …

45.    if (nResponse == IDOK)
46.    {
47.    // TODO: Place code here to handle when the dialog is
48.    // dismissed with OK
49.    }
50.    else if (nResponse == IDCANCEL)
51.    {
52.    // TODO: Place code here to handle when the dialog is
53.    // dismissed with Cancel
54.    }
55.    // Since the dialog has been closed, return FALSE so that we exit the
56.    // application, rather than start the application's message pump.
57.    return FALSE;
58.    }
59.    int CBHOApp::ExitInstance()
60.    {
61.    // TODO: Add your specialized code here and/or call the base class
62.    ExitSkin();

John