界面变更

This commit is contained in:
changcheng 2020-06-29 12:34:37 +08:00
parent dc7e4d9ae2
commit fe08644d48
14 changed files with 110 additions and 39 deletions

Binary file not shown.

Binary file not shown.

View File

@ -295,6 +295,7 @@
<Image Include="res\cmdshell.ico" />
<Image Include="res\dword.ico" />
<Image Include="res\file_ico.ico" />
<Image Include="res\logo.bmp" />
<Image Include="res\regsz.ico" />
<Image Include="res\remote.ico" />
<Image Include="res\system.ico" />

View File

@ -236,5 +236,8 @@
<Image Include="res\file_ico.ico">
<Filter>资源文件</Filter>
</Image>
<Image Include="res\logo.bmp">
<Filter>资源文件</Filter>
</Image>
</ItemGroup>
</Project>

View File

@ -76,6 +76,7 @@ void CCcRemoteDlg::DoDataExchange(CDataExchange* pDX)
CDialogEx::DoDataExchange(pDX);
DDX_Control(pDX, IDC_ONLINE, m_CList_Online);
DDX_Control(pDX, IDC_MESSAGE, m_CList_Message);
DDX_Control(pDX, IDC_STATIC_LOGO, m_PicLogoA);
}
BEGIN_MESSAGE_MAP(CCcRemoteDlg, CDialogEx)
@ -221,16 +222,18 @@ BOOL CCcRemoteDlg::OnInitDialog()
////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////
m_OnlineCount = 0;//初始上线数为0
InitSystemMenu();//初始化系统托盘
InitToolBar();//初始化工具栏按钮控件
InitMyMenu();//初始化菜单控件
InitList();//初始化列表控件
m_OnlineCount = 0; // 初始上线数为0
InitPic();
InitSystemMenu(); // 初始化系统托盘
InitToolBar(); // 初始化工具栏按钮控件
InitMyMenu(); // 初始化菜单控件
InitList(); // 初始化列表控件
InitStatusBar();//初始化状态栏控件
//---------改变窗口大小触发动态调整-------|
CRect rect;
GetWindowRect(&rect);
rect.bottom += 20;
rect.right += 30;
MoveWindow(rect);
//----------------------------------------|
ListenPort();//监听端口
@ -239,6 +242,18 @@ BOOL CCcRemoteDlg::OnInitDialog()
return TRUE; // 除非将焦点设置到控件,否则返回 TRUE
}
void CCcRemoteDlg::InitPic()
{
CRect rect;
rect.left = 0;
rect.top = 0;
m_PicLogoA.MoveWindow(rect);
//通过资源ID载入BitMap资源
p.LoadBitmapA(IDB_BITMAP_LOGO);
//给图片控件设置位图
m_PicLogoA.SetBitmap((HBITMAP)p.m_hObject);
}
void CCcRemoteDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
@ -357,7 +372,8 @@ void CCcRemoteDlg::OnSize(UINT nType, int cx, int cy)
if (m_ToolBar.m_hWnd != NULL) //工具条
{
CRect rc;
rc.top = rc.left = 0;
rc.top = 0;
rc.left = 250;
rc.right = cx;
rc.bottom = 80;
m_ToolBar.MoveWindow(rc); //设置工具条大小位置

View File

@ -38,23 +38,30 @@ protected:
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg HCURSOR OnQueryDragIcon();
DECLARE_MESSAGE_MAP()
public:
CStatusBar m_wndStatusBar;//状态控件
CListCtrl m_CList_Online;//在线列表变量
CListCtrl m_CList_Message;//消息列表变量
CTrueColorToolBar m_ToolBar;//工具条按钮控件变量
afx_msg void OnSize(UINT nType, int cx, int cy);
private:
//--------------变量及常量----------------
SEU_QQwry *m_QQwry; //识别IP区域
int m_OnlineCount;//上线计数
CBrush m_brush;//绘色函数
CMenu popup;//LIST菜单变量
NOTIFYICONDATA nid;//含有图标 消息响应 的一个结构体 用于系统托盘
NOTIFYICONDATA nid; // 含有图标 消息响应 的一个结构体 用于系统托盘
CMenu popup; // LIST菜单变量
SEU_QQwry* m_QQwry; // 识别IP区域
CBrush m_brush; // 绘色函数
CTrueColorToolBar m_ToolBar; // 工具条按钮控件变量
CBitmap p;
CStatic m_PicLogoA; // 左上角logo
CStatusBar m_wndStatusBar; // 状态控件
CListCtrl m_CList_Online; // 在线列表变量
CListCtrl m_CList_Message;// 消息列表变量
int m_OnlineCount; // 上线计数
#define COLUMN_ONLINE_COUNT 7 //在线列表的个数
#define COLUMN_MESSAGE_COUNT 3 //消息列表的个数
@ -82,21 +89,26 @@ private:
//-----------------------函数-----------------------
int InitList();//初始化list控件信息
int InitMyMenu();//初始化主页面上方菜单
void InitStatusBar();//初始化状态控件
void InitToolBar();//初始化工具条按钮控件
void InitSystemMenu();//初始化系统托盘菜单
void AddList(CString strIP, CString strAddr, CString strPCName, CString strOS, CString strCPU, CString strVideo, CString strPing, ClientContext*pContext);
void ShowMessage(bool bIsOK, CString strMsg);//显示日志
void Test();
void Test();
int InitList(); // 初始化list控件信息
int InitMyMenu(); // 初始化主页面上方菜单
void InitStatusBar(); // 初始化状态控件
void InitToolBar(); // 初始化工具条按钮控件
void InitSystemMenu(); // 初始化系统托盘菜单
void ListenPort(); // 监听端口设置
void InitPic(); // 初始化界面图片
void Activate(UINT nPort, UINT nMaxConnections); // 监听端口
void ShowMessage(bool bIsOK, CString strMsg); // 显示日志
void ListenPort();
// 添加信息到列表
void AddList(CString strIP, CString strAddr, CString strPCName, CString strOS, CString strCPU, CString strVideo, CString strPing, ClientContext*pContext);
// socket 的处理都要调用这个回调函数
static void CALLBACK NotifyProc(LPVOID lpParam, ClientContext* pContext, UINT nCode);
void Activate(UINT nPort, UINT nMaxConnections);//监听端口
// 控制命令都要经过这个函数
static void ProcessReceiveComplete(ClientContext *pContext);
public:
//-------------自定义消息处理-------------
afx_msg void OnIconNotify(WPARAM wParam, LPARAM lParam);
@ -131,4 +143,5 @@ private:
public:
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
};

View File

@ -1,2 +1,37 @@
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.res
f:\myapp\ccremote\ccremote\ccremote\..\..\bin\ccremote.exe
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremote.pch
g:\ccremote\ccremote\ccremote\ccremote\debug\vc141.pdb
g:\ccremote\ccremote\ccremote\ccremote\debug\vc141.idb
g:\ccremote\ccremote\ccremote\ccremote\debug\pch.obj
g:\ccremote\ccremote\ccremote\ccremote\debug\audio.obj
g:\ccremote\ccremote\ccremote\ccremote\debug\truecolortoolbar.obj
g:\ccremote\ccremote\ccremote\ccremote\debug\seu_qqwry.obj
g:\ccremote\ccremote\ccremote\ccremote\debug\regdlg.obj
g:\ccremote\ccremote\ccremote\ccremote\debug\inputdlg.obj
g:\ccremote\ccremote\ccremote\ccremote\debug\inifile.obj
g:\ccremote\ccremote\ccremote\ccremote\debug\cpuusage.obj
g:\ccremote\ccremote\ccremote\ccremote\debug\csystemdlg.obj
g:\ccremote\ccremote\ccremote\ccremote\debug\cshelldlg.obj
g:\ccremote\ccremote\ccremote\ccremote\debug\csettingdlg.obj
g:\ccremote\ccremote\ccremote\ccremote\debug\cscreenspydlg.obj
g:\ccremote\ccremote\ccremote\ccremote\debug\filetransfermodedlg.obj
g:\ccremote\ccremote\ccremote\ccremote\debug\cserverdlg.obj
g:\ccremote\ccremote\ccremote\ccremote\debug\cfilemanagerdlg.obj
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremotedlg.obj
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremote.obj
g:\ccremote\ccremote\ccremote\ccremote\debug\caudiodlg.obj
g:\ccremote\ccremote\ccremote\ccremote\debug\iocpserver.obj
g:\ccremote\ccremote\ccremote\ccremote\debug\buffer.obj
g:\ccremote\ccremote\bin\ccremote.ilk
g:\ccremote\ccremote\bin\ccremote.exe
g:\ccremote\ccremote\bin\ccremote.pdb
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremote.res
g:\ccremote\ccremote\ccremote\ccremote\..\..\bin\ccremote.exe
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremote.tlog\cl.command.1.tlog
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremote.tlog\cl.read.1.tlog
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremote.tlog\cl.write.1.tlog
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremote.tlog\link.command.1.tlog
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremote.tlog\link.read.1.tlog
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremote.tlog\link.write.1.tlog
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremote.tlog\rc.command.1.tlog
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremote.tlog\rc.read.1.tlog
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremote.tlog\rc.write.1.tlog

View File

@ -1,9 +1,12 @@
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。
IOCPServer.cpp
f:\myapp\ccremote\ccremote\ccremote\include\iocpserver.cpp(133): warning C4996: 'WSASocketA': Use WSASocketW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(3416): note: 参见“WSASocketA”的声明
f:\myapp\ccremote\ccremote\ccremote\include\iocpserver.cpp(725): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
f:\myapp\ccremote\ccremote\ccremote\include\iocpserver.cpp(774): warning C4244: “初始化”: 从“double”转换到“unsigned long”可能丢失数据
f:\myapp\ccremote\ccremote\ccremote\include\iocpserver.cpp(920): warning C4018: “>=”: 有符号/无符号不匹配
CcRemote.vcxproj -> F:\myapp\CcRemote\CcRemote\CcRemote\..\..\bin\CcRemote.exe
G:\VS2017\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。
CcRemoteDlg.cpp
g:\ccremote\ccremote\ccremote\ccremote\ccremotedlg.cpp(169): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明
g:\ccremote\ccremote\ccremote\ccremote\ccremotedlg.cpp(174): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
g:\ccremote\ccremote\ccremote\ccremote\ccremotedlg.cpp(331): warning C4244: “初始化”: 从“double”转换到“int”可能丢失数据
g:\ccremote\ccremote\ccremote\ccremote\ccremotedlg.cpp(354): warning C4244: “初始化”: 从“double”转换到“int”可能丢失数据
g:\ccremote\ccremote\ccremote\ccremote\ccremotedlg.cpp(860): warning C4018: “<=”: 有符号/无符号不匹配
g:\ccremote\ccremote\ccremote\ccremote\ccremotedlg.cpp(948): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
CcRemote.vcxproj -> G:\CcRemote\CcRemote\CcRemote\CcRemote\..\..\bin\CcRemote.exe

Binary file not shown.

View File

@ -1,2 +1,2 @@
#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17763.0
Debug|Win32|F:\myapp\CcRemote\CcRemote\|
Debug|Win32|G:\CcRemote\CcRemote\CcRemote\|

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Binary file not shown.