Click here to Skip to main content
13,004,215 members (63,152 online)
Click here to Skip to main content


99 bookmarked
Posted 27 Oct 2001

How to write a simple but effective TCP/IP port scanner for Win32

, 27 Oct 2001
An article on how to write a TCP/IP port scanner with a GUI, based on the MFC's property sheet paradigm
	Classe base per il dialogo basato sul property sheet.
	Luca Piergentili, 14/07/99

#include <string.h>
#include "strcpyn.h"
#include <ctype.h>
#include "window.h"
#include "CPropertyPageList.h"
#include "CPropertyPageDialog.h"
#include "CPropertySheetDialogMessages.h"

class CPropertySheetDialog : public CPropertySheet

	// costruttore/distruttore
	CPropertySheetDialog(CWnd* = NULL,CPropertyPageList* = NULL);
	virtual ~CPropertySheetDialog() {}

	// gestori
	virtual void	OnSysCommand		(UINT,LPARAM);				// menu di sistema
	virtual BOOL	OnInitDialog		(void);					// inizializzazione dialogo
	virtual void	OnOK				(void);					// bottone IDOK dello sheet
	virtual void	OnCancel			(void);					// bottone IDCANCEL dello sheet
	LONG			OnActivatePage		(UINT wParam,LONG lParam);	// attiva la pagina

	// membri
	inline BOOL	Create			(void) {return(m_bCreated);}	// per verificare la corretta inizializzazione dello sheet

	// membri
	void		EnableSheetButton		(UINT);
	void		DisableSheetButton		(UINT);

	void		SetSheetOkButtonText	(LPCSTR);						// cambia il testo del bottone OK
	LPCSTR	GetSheetOkButtonText	(void);						// ricava il testo del bottone OK
	void		EnableSheetButtons		(LPCSTR = IDCANCEL_EXIT_PROMPT);	// abilita OK e imposta CANCEL
	void		DisableSheetButtons		(LPCSTR = IDCANCEL_CANCEL_PROMPT);	// disabilita OK e imposta CANCEL
	LONG		OnSetSheetOkButtonText	(UINT,LONG);					// idem per la chiamata dalle pagine
	LONG		OnGetSheetOkButtonText	(UINT,LONG);
	LONG		OnEnableSheetButtons	(UINT,LONG);
	LONG		OnDisableSheetButtons	(UINT,LONG);
	LONG		OnPropertySheetButton	(UINT,LONG);

	// variabili
	BOOL				m_bCreated;								// flag per esito costruttore
	CPropertyPageList*	m_pPropertyPageList;						// lista per le pagine dello sheet
	CPropertyPage*		m_pActivePageOnButtonClick;					// puntatore alla pagina che ha ricevuto il click su IDOK
	CStatusBarCtrl		m_StatusBar;								// status bar



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 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


About the Author

Luca Piergentili
Web Developer
Italy Italy
I like C and C++, Acid Jazz, James Brown, gli Spaghetti Aglio e Olio, alla Bolognesa, alla Puttanesca e le Fettuccine alla Matriciana ('Maccaroni' over the world). Of course I like beautiful big tits girls too, my little car, Frank Zappa, the art of Zen, italian coffee and much more...

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170627.1 | Last Updated 28 Oct 2001
Article Copyright 2001 by Luca Piergentili
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid