diff --git a/CcRemote/.vs/CcRemote/v15/.suo b/CcRemote/.vs/CcRemote/v15/.suo
index 07c115b..b0a1159 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 ecd8040..03b3e61 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 9754542..702f201 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 01d23a7..dec3f70 100644
--- a/CcRemote/CcRemote/CcRemote.vcxproj.filters
+++ b/CcRemote/CcRemote/CcRemote.vcxproj.filters
@@ -239,5 +239,8 @@
资源文件
+
+ 资源文件
+
\ No newline at end of file
diff --git a/CcRemote/CcRemote/CcRemoteDlg.cpp b/CcRemote/CcRemote/CcRemoteDlg.cpp
index 96c3291..2dc7243 100644
--- a/CcRemote/CcRemote/CcRemoteDlg.cpp
+++ b/CcRemote/CcRemote/CcRemoteDlg.cpp
@@ -223,22 +223,23 @@ BOOL CCcRemoteDlg::OnInitDialog()
////////////////////////////////////////////////////////////////////////////////////////////////////////
m_OnlineCount = 0; // 初始上线数为0
- InitPic();
+
InitSystemMenu(); // 初始化系统托盘
InitToolBar(); // 初始化工具栏按钮控件
InitMyMenu(); // 初始化菜单控件
InitList(); // 初始化列表控件
InitStatusBar();//初始化状态栏控件
+ InitPic();
//---------改变窗口大小触发动态调整-------|
CRect rect;
GetWindowRect(&rect);
- rect.bottom += 20;
+ rect.bottom += 50;
rect.right += 30;
MoveWindow(rect);
//----------------------------------------|
ListenPort();//监听端口
Test();
-
+ isTrue = 0;
return TRUE; // 除非将焦点设置到控件,否则返回 TRUE
}
@@ -249,9 +250,10 @@ void CCcRemoteDlg::InitPic()
rect.top = 0;
m_PicLogoA.MoveWindow(rect);
//通过资源ID载入BitMap资源
- p.LoadBitmapA(IDB_BITMAP_LOGO);
+ m_BitmapPicLogoA.LoadBitmapA(IDB_BITMAP_LOGO);
+
//给图片控件设置位图
- m_PicLogoA.SetBitmap((HBITMAP)p.m_hObject);
+ m_PicLogoA.SetBitmap(m_BitmapPicLogoA);
}
void CCcRemoteDlg::OnSysCommand(UINT nID, LPARAM lParam)
@@ -331,12 +333,9 @@ void CCcRemoteDlg::OnSize(UINT nType, int cx, int cy)
int lenth = dd; //转换为int 类型
m_CList_Online.SetColumnWidth(i, (lenth)); //设置当前的宽度
}
- //TCHAR szBuffer[_MAX_PATH];
- //VERIFY(::GetModuleFileName(AfxGetInstanceHandle(), szBuffer, _MAX_PATH));
- //CString sPath = (CString)szBuffer; sPath = sPath.Left(sPath.ReverseFind('\\') + 1);
- CString sPath = "F:\\myapp\\CcRemote\\CcRemote\\CcRemote\\res\\background_list_online.bmp";
- m_CList_Online.SetBkImage(sPath.GetBuffer(sPath.GetLength()), TRUE); // 定义:CListCtrl m_controllist1;
- sPath.ReleaseBuffer();
+
+
+
}
if (m_CList_Message.m_hWnd != NULL)
{
@@ -354,9 +353,6 @@ void CCcRemoteDlg::OnSize(UINT nType, int cx, int cy)
int lenth = dd; //转换为int 类型
m_CList_Message.SetColumnWidth(i, (lenth)); //设置当前的宽度
}
- CString sPath = "F:\\myapp\\CcRemote\\CcRemote\\CcRemote\\res\\background_list_online.bmp";
- m_CList_Message.SetBkImage(sPath.GetBuffer(sPath.GetLength()), TRUE); // 定义:CListCtrl m_controllist1;
- sPath.ReleaseBuffer();
}
if (m_wndStatusBar.m_hWnd != NULL) { //当对话框大小改变时 状态条大小也随之改变
@@ -378,6 +374,7 @@ void CCcRemoteDlg::OnSize(UINT nType, int cx, int cy)
rc.bottom = 80;
m_ToolBar.MoveWindow(rc); //设置工具条大小位置
}
+
// TODO: 在此处添加消息处理程序代码
}
@@ -1161,7 +1158,7 @@ BOOL CCcRemoteDlg::OnEraseBkgnd(CDC* pDC)
//pDC->StretchBlt(0, 0, rect.Width(), rect.Height(), &MemDC, 0, 0, Bp.bmWidth, Bp.bmHeight, SRCCOPY);
//MemDC.DeleteDC();
- return TRUE;
+ //return TRUE;
return CDialogEx::OnEraseBkgnd(pDC);
}
@@ -1170,33 +1167,17 @@ HBRUSH CCcRemoteDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialogEx::OnCtlColor(pDC, pWnd, nCtlColor);
- // TODO: 在此更改 DC 的任何特性
- //switch (pWnd->GetDlgCtrlID()) {
- ////case IDC_STATIC_NAME:
- ////case IDC_STATIC_ID:
- ////case IDC_STATIC_PW:
- //// pDC->SetBkMode(TRANSPARENT);
- //// pDC->SetTextColor(RGB(0, 255, 0));
- //// hbr = (HBRUSH)GetStockObject(NULL_BRUSH);//空画刷,不加此句会有阴影
- //// break;
- //case IDR_TOOLBAR_MAIN:
- // CWnd* pd;
- // CRect rc;
- // if (pWnd->GetDlgCtrlID() == IDR_TOOLBAR_MAIN)
- // pd = (CWnd*)GetDlgItem(IDR_TOOLBAR_MAIN);
- // pd->GetClientRect(&rc);
- // ScreenToClient(&rc);
- // pDC->SetBkMode(TRANSPARENT);
- // pDC->SetTextColor(RGB(255, 0, 0));
- // CBitmap bmp;
- // bmp.LoadBitmap(IDB_BACKGROUND_CCREMOTE);
- // CBrush brush(&bmp);
- // CBrush* pOldBrush = (CBrush*)pDC->SelectObject(&brush);
- // pDC->FillRect(&rc, &brush);
- // hbr = (HBRUSH)brush;
- // break;
- //}
-
- // TODO: 如果默认的不是所需画笔,则返回另一个画笔
+ if (m_CList_Online.m_hWnd != NULL&& isTrue == 0)
+ {
+ TCHAR szBuffer[_MAX_PATH];
+ VERIFY(::GetModuleFileName(AfxGetInstanceHandle(), szBuffer, _MAX_PATH));
+ CString sPath = (CString)szBuffer;
+ sPath = sPath.Left(sPath.ReverseFind('\\') + 1);
+ sPath += "res\\list_online_pic.bmp";
+ isTrue = m_CList_Online.SetBkImage(sPath.GetBuffer(sPath.GetLength()), TRUE); // 定义:CListCtrl m_controllist1;
+ sPath.ReleaseBuffer();
+ // TODO: 如果默认的不是所需画笔,则返回另一个画笔
+ }
+
return hbr;
}
diff --git a/CcRemote/CcRemote/CcRemoteDlg.h b/CcRemote/CcRemote/CcRemoteDlg.h
index a8d4c69..5e7b1b4 100644
--- a/CcRemote/CcRemote/CcRemoteDlg.h
+++ b/CcRemote/CcRemote/CcRemoteDlg.h
@@ -55,13 +55,15 @@ private:
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; // 上线计数
+ CBitmap m_BitmapPicLogoA;
+ CStatic m_PicLogoA; // 左上角logo
+
+ bool isTrue; //list背景是否已经加载
#define COLUMN_ONLINE_COUNT 7 //在线列表的个数
#define COLUMN_MESSAGE_COUNT 3 //消息列表的个数
diff --git a/CcRemote/CcRemote/Debug/CcRemote.Build.CppClean.log b/CcRemote/CcRemote/Debug/CcRemote.Build.CppClean.log
index 89b2a41..df0deb5 100644
--- a/CcRemote/CcRemote/Debug/CcRemote.Build.CppClean.log
+++ b/CcRemote/CcRemote/Debug/CcRemote.Build.CppClean.log
@@ -21,9 +21,6 @@ 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
diff --git a/CcRemote/CcRemote/Debug/CcRemote.log b/CcRemote/CcRemote/Debug/CcRemote.log
index 0376867..9b84644 100644
--- a/CcRemote/CcRemote/Debug/CcRemote.log
+++ b/CcRemote/CcRemote/Debug/CcRemote.log
@@ -1,12 +1,14 @@
G:\VS2017\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。
+ CcRemote.cpp
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:\ccremote\ccremote\ccremote\ccremote\ccremotedlg.cpp(333): warning C4244: “初始化”: 从“double”转换到“int”,可能丢失数据
+g:\ccremote\ccremote\ccremote\ccremote\ccremotedlg.cpp(353): warning C4244: “初始化”: 从“double”转换到“int”,可能丢失数据
+g:\ccremote\ccremote\ccremote\ccremote\ccremotedlg.cpp(857): warning C4018: “<=”: 有符号/无符号不匹配
+g:\ccremote\ccremote\ccremote\ccremote\ccremotedlg.cpp(945): 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 caea077..354afa2 100644
Binary files a/CcRemote/CcRemote/Debug/CcRemote.res and b/CcRemote/CcRemote/Debug/CcRemote.res differ
diff --git a/CcRemote/CcRemote/res/list_online_pic.bmp b/CcRemote/CcRemote/res/list_online_pic.bmp
new file mode 100644
index 0000000..e224e6f
Binary files /dev/null and b/CcRemote/CcRemote/res/list_online_pic.bmp differ
diff --git a/CcRemote/CcRemote/res/list_online_pic2.bmp b/CcRemote/CcRemote/res/list_online_pic2.bmp
new file mode 100644
index 0000000..a107e1b
Binary files /dev/null and b/CcRemote/CcRemote/res/list_online_pic2.bmp differ
diff --git a/CcRemote/CcRemote/resource.h b/CcRemote/CcRemote/resource.h
index 1bc07ab..c555b3d 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 5bb64a6..a3da5e5 100644
Binary files a/bin/CcRemote.exe and b/bin/CcRemote.exe differ
diff --git a/bin/res/list_online_pic.bmp b/bin/res/list_online_pic.bmp
new file mode 100644
index 0000000..e224e6f
Binary files /dev/null and b/bin/res/list_online_pic.bmp differ
diff --git a/bin/res/list_online_pic2.bmp b/bin/res/list_online_pic2.bmp
new file mode 100644
index 0000000..a107e1b
Binary files /dev/null and b/bin/res/list_online_pic2.bmp differ