Click here to Skip to main content
11,502,201 members (64,934 online)
Click here to Skip to main content
Add your own
alternative version

Internet Explorer AdBlock

, 17 Jan 2008 GPL3 38.5K 1.8K 41
Internet Explorer AdBlock Add-on
IE AdBlockPS
IE AdBlockps.def
IE AdBlock
IE AdBlock.def
IE AdBlock.rgs
// DropWnd.h : header file
// CAdvComboBox Control
// Version: 2.1
// Date: September 2002
// Author: Mathias Tunared
// Email:
// Copyright (c) 2002. All Rights Reserved.
// This code, in compiled form or as source code, may be redistributed 
// unmodified PROVIDING it is not sold for profit without the authors 
// written consent, and providing that this notice and the authors name 
// and all copyright notices remains intact.
// This file is provided "as is" with no expressed or implied warranty.
// The author accepts no liability for any damage/loss of business that
// this product may cause.

#ifndef DROPWND_H
#define DROPWND_H

#pragma warning(push, 3)
#include <list>
#include <string>
#pragma warning(pop)
#include <tchar.h>
typedef std::basic_string<TCHAR> tstring;

using namespace std;
typedef struct _LIST_ITEM
	tstring strText;
	BOOL bDisabled;
	BOOL bChecked;
	void* vpItemData;

		strText = _T("");
		bDisabled = FALSE;
		bChecked = FALSE;
		vpItemData = NULL;

	BOOL operator <(_LIST_ITEM other)
		if( strText < other.strText )
			return TRUE;
			return FALSE;

#include "DropListBox.h"
#include "DropScrollBar.h"

// CDropWnd window

class CDropWnd : public CWnd
// Construction
	CDropWnd( CWnd* pComboParent, list<LIST_ITEM> &itemlist, DWORD dwACBStyle );

// Attributes
	CDropListBox*	GetListBoxPtr() { return m_listbox; }
	CDropScrollBar* GetScrollBarPtr() { return m_scrollbar; }

// Operations
	list<LIST_ITEM>& GetList() { return m_list; }

// Overrides
	// ClassWizard generated virtual function overrides
	//virtual BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, 
	//	UINT nID, CCreateContext* pContext = NULL);
	virtual BOOL DestroyWindow();
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);

// Implementation
	virtual ~CDropWnd();

	// Generated message map functions
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnPaint();
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
	afx_msg LONG OnSetCapture( WPARAM wParam, LPARAM lParam );
	afx_msg LONG OnReleaseCapture( WPARAM wParam, LPARAM lParam );

#if (_MSC_VER > 1200)
	afx_msg void OnActivateApp(BOOL bActive, DWORD dwThreadID);
	afx_msg void OnActivateApp(BOOL bActive, HTASK hTask);


	int m_nMaxX;	//+++
	int m_nMaxY;	//+++
	CDropListBox* m_listbox;
	CRect m_rcList;
	CDropScrollBar* m_scrollbar;
	CRect m_rcScroll;
	CRect m_rcSizeHandle;

	CWnd* m_pComboParent;
	CFont* m_pListFont;

	list<LIST_ITEM> m_list;
	list<LIST_ITEM>::iterator m_iter;

	bool m_bResizing;
	CPoint m_ptLastResize;
	int m_nMouseDiffX;
	int m_nMouseDiffY;
	DWORD m_dwACBStyle;


// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif //DROPWND_H

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.


This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


About the Author

Geert van Horrik
Software Developer CatenaLogic
Netherlands Netherlands
I am Geert van Horrik, and I have studied Computer Science in the Netherlands.

I love to write software using .NET (especially the combination of WPF and C#). I am also the lead developer of Catel, an open-source application development framework for WPF, Silverlight, WP7 and WinRT with the focus on MVVM.

I have my own company since January 1st 2007, called CatenaLogic. This company develops commercial and non-commercial software.

To download (or buy) applications I have written, visit my website:
Follow on   Twitter

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150520.1 | Last Updated 17 Jan 2008
Article Copyright 2008 by Geert van Horrik
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid