diff --git a/CcRemote/.vs/CcRemote/v15/.suo b/CcRemote/.vs/CcRemote/v15/.suo index fc9c66f..07c115b 100644 Binary files a/CcRemote/.vs/CcRemote/v15/.suo and b/CcRemote/.vs/CcRemote/v15/.suo differ diff --git a/CcRemote/CcRemote/CcRemote.rc b/CcRemote/CcRemote/CcRemote.rc index 48cbffc..ecd8040 100644 Binary files a/CcRemote/CcRemote/CcRemote.rc and b/CcRemote/CcRemote/CcRemote.rc differ diff --git a/CcRemote/CcRemote/CcRemote.vcxproj b/CcRemote/CcRemote/CcRemote.vcxproj index ad552c1..9754542 100644 --- a/CcRemote/CcRemote/CcRemote.vcxproj +++ b/CcRemote/CcRemote/CcRemote.vcxproj @@ -295,6 +295,7 @@ + diff --git a/CcRemote/CcRemote/CcRemote.vcxproj.filters b/CcRemote/CcRemote/CcRemote.vcxproj.filters index 98f8cda..01d23a7 100644 --- a/CcRemote/CcRemote/CcRemote.vcxproj.filters +++ b/CcRemote/CcRemote/CcRemote.vcxproj.filters @@ -236,5 +236,8 @@ 资源文件 + + 资源文件 + \ No newline at end of file diff --git a/CcRemote/CcRemote/CcRemoteDlg.cpp b/CcRemote/CcRemote/CcRemoteDlg.cpp index eb8936b..96c3291 100644 --- a/CcRemote/CcRemote/CcRemoteDlg.cpp +++ b/CcRemote/CcRemote/CcRemoteDlg.cpp @@ -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,24 +222,38 @@ 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();//监听端口 Test(); - + 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); //设置工具条大小位置 diff --git a/CcRemote/CcRemote/CcRemoteDlg.h b/CcRemote/CcRemote/CcRemoteDlg.h index 68c3673..a8d4c69 100644 --- a/CcRemote/CcRemote/CcRemoteDlg.h +++ b/CcRemote/CcRemote/CcRemoteDlg.h @@ -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); + }; diff --git a/CcRemote/CcRemote/Debug/CcRemote.Build.CppClean.log b/CcRemote/CcRemote/Debug/CcRemote.Build.CppClean.log index 773c13d..89b2a41 100644 --- a/CcRemote/CcRemote/Debug/CcRemote.Build.CppClean.log +++ b/CcRemote/CcRemote/Debug/CcRemote.Build.CppClean.log @@ -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 diff --git a/CcRemote/CcRemote/Debug/CcRemote.log b/CcRemote/CcRemote/Debug/CcRemote.log index 4780b81..0376867 100644 --- a/CcRemote/CcRemote/Debug/CcRemote.log +++ b/CcRemote/CcRemote/Debug/CcRemote.log @@ -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 diff --git a/CcRemote/CcRemote/Debug/CcRemote.res b/CcRemote/CcRemote/Debug/CcRemote.res index efac198..caea077 100644 Binary files a/CcRemote/CcRemote/Debug/CcRemote.res and b/CcRemote/CcRemote/Debug/CcRemote.res differ diff --git a/CcRemote/CcRemote/Debug/CcRemote.tlog/CcRemote.lastbuildstate b/CcRemote/CcRemote/Debug/CcRemote.tlog/CcRemote.lastbuildstate index c0e4c06..4f8bf97 100644 --- a/CcRemote/CcRemote/Debug/CcRemote.tlog/CcRemote.lastbuildstate +++ b/CcRemote/CcRemote/Debug/CcRemote.tlog/CcRemote.lastbuildstate @@ -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\| diff --git a/CcRemote/CcRemote/Debug/iocpserver.obj.enc b/CcRemote/CcRemote/Debug/iocpserver.obj.enc deleted file mode 100644 index a85a2f7..0000000 Binary files a/CcRemote/CcRemote/Debug/iocpserver.obj.enc and /dev/null differ diff --git a/CcRemote/CcRemote/res/logo.bmp b/CcRemote/CcRemote/res/logo.bmp new file mode 100644 index 0000000..3bc544c Binary files /dev/null and b/CcRemote/CcRemote/res/logo.bmp differ diff --git a/CcRemote/CcRemote/resource.h b/CcRemote/CcRemote/resource.h index a98bd5a..1bc07ab 100644 Binary files a/CcRemote/CcRemote/resource.h and b/CcRemote/CcRemote/resource.h differ diff --git a/bin/CcRemote.exe b/bin/CcRemote.exe index 128e036..5bb64a6 100644 Binary files a/bin/CcRemote.exe and b/bin/CcRemote.exe differ