Click here to Skip to main content
15,887,596 members
Articles / Programming Languages / C++

MoreFast Add-In for faster Development

,
Rate me:
Please Sign up or sign in to vote.
4.53/5 (9 votes)
8 Aug 20026 min read 177.4K   1.9K   45  
A VS addin that does a variety of different tasks to make programming easier.
// RemoveBM.cpp : implementation file
//

#include "stdafx.h"
#include "MoreFast.h"

#include "RemoveBM.h"

#ifndef BM
#define BM
struct BookMark
{
	char title[50];
	char fname[256];
	long lno;
};
#endif


#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif


/////////////////////////////////////////////////////////////////////////////
// CRemoveBM dialog


CRemoveBM::CRemoveBM(CWnd* pParent /*=NULL*/)
	: CDialog(CRemoveBM::IDD, pParent)
{
	//{{AFX_DATA_INIT(CRemoveBM)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CRemoveBM::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CRemoveBM)
	DDX_Control(pDX, IDC_LIST, m_list);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CRemoveBM, CDialog)
	//{{AFX_MSG_MAP(CRemoveBM)
	ON_BN_CLICKED(IDC_BUTTON1, OnRemove)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CRemoveBM message handlers

void CRemoveBM::SetPointer(void *bm)
{
	m_ppBM = (BookMark *)&bm;
}

BOOL CRemoveBM::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	for(int i=0;i<tempnoBM;i++)
		m_list.AddString(tempBM[i].title);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CRemoveBM::OnRemove() 
{
	// TODO: Add your control notification handler code here
	int sel;
	sel = m_list.GetCurSel();

	if(sel==LB_ERR)
	{
		AfxMessageBox("First Select Item From List Box");
		return;
	}

	tempBM[sel].removed = TRUE;

	m_list.ResetContent();
	for(int i=0;i<tempnoBM;i++)
	{
		if(tempBM[i].removed)
		{
			m_list.AddString("");
			continue;
		}
		else
		m_list.AddString(tempBM[i].title);
	}
	m_list.SetCurSel(sel+1);
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Founder IntelliPro Solutions Pvt. Ltd.
India India
A 8 or something in .NET, living in Ahmedabad, India owned IntelliPro Solutions Pvt. Ltd..

Currently working on .NET technologies, MVC and Silverlight.

My little blog is for helping community with the solution for problems or helping them to understand new technology. You can reach to my blog at http://maniish.wordpress.com.

To contact me, post comment here or email me at manish AT iprospl.com
This is a Organisation (No members)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions