• 大小: 37KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-11
  • 语言: C/C++
  • 标签: 端口扫描  VC++  

资源简介

内容索引:VC/C++源码,系统相关,端口扫描   高级编程VC++端口扫描源代码,程序核心来自国外,作者汉化了界面,注释保留为英文,源代码可参考性大,端口扫描准确/快速,在VC++6下顺利编译

资源截图

代码片段和文件信息

// MainFrm.cpp : implementation of the CMainframe class
// Download by http://www.codefans.net

#include “stdafx.h“
#include “PortScan.h“

#include “MainFrm.h“
#include “Splash.h“

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

/////////////////////////////////////////////////////////////////////////////
// CMainframe

IMPLEMENT_DYNCREATE(CMainframe CframeWnd)

BEGIN_MESSAGE_MAP(CMainframe CframeWnd)
//{{AFX_MSG_MAP(CMainframe)
// NOTE - the ClassWizard will add and remove mapping macros here.
//    DO NOT EDIT what you see in these blocks of generated code !
ON_WM_CREATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

static UINT indicators[] =
{
ID_SEPARATOR           // status line indicator
ID_INDICATOR_CAPS
ID_INDICATOR_NUM
ID_INDICATOR_SCRL
};

/////////////////////////////////////////////////////////////////////////////
// CMainframe construction/destruction

CMainframe::CMainframe()
{
// TODO: add member initialization code here

}

CMainframe::~CMainframe()
{
}

int CMainframe::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CframeWnd::OnCreate(lpCreateStruct) == -1)
return -1;

if (!m_wndToolBar.CreateEx(this TBstyle_FLAT WS_CHILD | WS_VISIBLE | CBRS_TOP
| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!m_wndToolBar.LoadToolBar(IDR_MAINframe))
{
TRACE0(“Failed to create toolbar\n“);
return -1;      // fail to create
}

if (!m_wndStatusBar.Create(this) ||
!m_wndStatusBar.SetIndicators(indicators
  sizeof(indicators)/sizeof(UINT)))
{
TRACE0(“Failed to create status bar\n“);
return -1;      // fail to create
}

// TODO: Delete these three lines if you don‘t want the toolbar to
//  be dockable
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);

// CG: The following line was added by the Splash Screen component.
//---new add
//CSplashWnd::ShowSplashScreen(this);
return 0;
}

BOOL CMainframe::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CframeWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
//  the CREATESTRUCT cs
//---new add
cs.style &= ~WS_THICKframe;
cs.style &= ~WS_MAXIMIZEBOX;
return TRUE;
}

/////////////////////////////////////////////////////////////////////////////
// CMainframe diagnostics

#ifdef _DEBUG
void CMainframe::AssertValid() const
{
CframeWnd::AssertValid();
}

void CMainframe::Dump(CDumpContext& dc) const
{
CframeWnd::Dump(dc);
}

#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CMainframe message handlers

//---new add
void CMainframe::SetStatusBarText(CString &text)
{
if (!text.IsEmpty())
m_wndStatusBar.SetWindowText(text);
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

----------- ---------  ---------- -----  ----

               148492                    29


评论

共有 条评论