资源简介
Windows平台下的图形化的Ping工具(基于MFC的Dialog工程)
代码片段和文件信息
// AutoCompleteComboBox.cpp : implementation file
//
#include “stdafx.h“
#include “WinPing.h“
#include “AutoCompleteComboBox.h“
// CAutoCompleteComboBox
IMPLEMENT_DYNAMIC(CAutoCompleteComboBox CComboBox)
CAutoCompleteComboBox::CAutoCompleteComboBox()
{
m_bAutoComplete = TRUE;
}
CAutoCompleteComboBox::~CAutoCompleteComboBox()
{
}
BEGIN_MESSAGE_MAP(CAutoCompleteComboBox CComboBox)
ON_CONTROL_REFLECT(CBN_EDITUPDATE &CAutoCompleteComboBox::OnEditUpdate)
END_MESSAGE_MAP()
// CAutoCompleteComboBox message handlers
BOOL CAutoCompleteComboBox::PreTranslateMessage(MSG *pMsg)
{
if(WM_KEYDOWN == pMsg->message)
{
m_bAutoComplete = TRUE;
if((VK_DELETE == pMsg->wParam) || (VK_BACK == pMsg->wParam))
{
m_bAutoComplete = FALSE;
}
}
return CComboBox::PreTranslateMessage(pMsg);
}
void CAutoCompleteComboBox::OnEditUpdate()
{
if(!m_bAutoComplete)
{
return ;
}
CString strText(_T(““));
GetWindowText(strText);
int nLen = strText.GetLength();
DWORD dwCurSel = GetEditSel();
WORD wStart = LOWORD(dwCurSel);
WORD wEnd = HIWORD(dwCurSel);
if(CB_ERR == SelectString(-1 strText))
{
SetWindowText(strText);
if(CB_ERR != dwCurSel)
{
SetEditSel(wStart wEnd);
}
}
if((wEnd < nLen) && (CB_ERR != dwCurSel))
{
SetEditSel(wStart wEnd);
}
else
{
SetEditSel(nLen -1);
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1393 2010-04-20 15:13 WinPing\AutoCompleteComboBox.cpp
文件 388 2010-04-20 15:07 WinPing\AutoCompleteComboBox.h
文件 2351 2010-04-20 14:11 WinPing\ProtoInfo.cpp
文件 1612 2010-04-20 13:50 WinPing\ProtoInfo.h
....... 67777 2007-11-28 16:21 WinPing\res\WinPing.ico
文件 398 2010-04-20 10:53 WinPing\res\WinPing.rc2
文件 771 2010-04-20 10:56 WinPing\resource.h
文件 209 2010-04-20 10:53 WinPing\stdafx.cpp
文件 2029 2010-04-20 10:53 WinPing\stdafx.h
文件 1432 2010-04-20 10:53 WinPing\targetver.h
文件 2678 2010-04-20 11:17 WinPing\WinPing.cpp
文件 170496 2010-04-20 17:38 WinPing\WinPing.exe
文件 609 2010-04-20 11:15 WinPing\WinPing.h
文件 5849 2010-04-20 17:35 WinPing\WinPing.rc
文件 879 2010-04-20 10:53 WinPing\WinPing.sln
..A..H. 14848 2010-04-20 17:56 WinPing\WinPing.suo
文件 5778 2010-04-20 15:13 WinPing\WinPing.vcproj
文件 10254 2010-04-20 17:25 WinPing\WinPingDlg.cpp
文件 989 2010-04-20 15:16 WinPing\WinPingDlg.h
目录 0 2010-04-20 17:57 WinPing\Debug
目录 0 2010-04-20 10:53 WinPing\res
目录 0 2010-04-20 17:57 WinPing
----------- --------- ---------- ----- ----
290740 22
- 上一篇:PBIL算法源代码C++
- 下一篇:VC++病毒编程入门
相关资源
- Windows下秒级创建上千条路由表 速度与
- windows后台监听键盘事件vs mfc版
- C/C++:Windows编程—代码获取本地所有
- 自己实现的ping源码
- C++&CLR 编写 Windows 窗体应用程序
- windows网络编程课程设计源代码
- libnfc 1.6 所有工具Windows编译 NFCTools
- windows串口控件
- 修改Windows路由表源码
- C/C++实现linux和Windows查看系统、进程、
- Windows C语言网络编程快速入门.pdf
- windows下获取音频信息(C++实现).
- Windows C/C++ 集成开发环境
- Turbo C/C++ for Windows 集成实验环境免安
- vc控制鼠标移动点击源代码
- Unity3D:讯飞实现语音识别功能语音转
- VC6在64位Windows7下调试的时候,再结束
- Microsoft Visual C++ 2005 Redistributable x64
- 新编Windows API参考大全全中文、win32
- windows8.1 sdk离线包
- GCC for windows MinGW 全套安装文件
- libXL 3.8.0 For Windows 正式授权及使用方
- redis windows C++客户端
- Intel C++ Compiler 11.1.054 windows (包含安
- Windows程序设计 (第五版) (C语言
- 用c语言实现PING程序设计
- 编写Ping程序(C++)
- windows文件夹监控(c++源码)
- zprotect 1.6 脱壳工具()
- windows系统编程源代码第四版
评论
共有 条评论