|
| NOTIFYICONDATA nid; //此处在类中定义 void CMyQQDlg::DisplayInTask() { if(isDisplayInTask) { //初始化nid nid.cbSize = sizeof(NOTIFYICONDATA); nid.hWnd =this->m_hWnd; nid.uID = IDR_QQMENU; nid.uFlags = NIF_ICON | NIF_TIP|NIF_MESSAGE ; nid.hIcon = m_hIcon; strcpy (nid.szTip, "任务栏图标"); nid.uCallbackMessage=WM_DISPLAYTASKICON; Shell_NotifyIcon(NIM_ADD,&nid); isDisplayInTask=FALSE; } else { Shell_NotifyIcon(NIM_DELETE,&nid); isDisplayInTask=true; } } |
| isDisplayInTask=true; DisplayInTask(); //显示到任务栏里面去; Sleep(500); OnOutline(); Sleep(500); OnHidden(); Sleep(500); OnOutline(); Sleep(500); OnHidden(); |
|
| // 将该对话框放置到右上角; GetWindowRect(&dlgrect); MoveWindow(GetSystemMetrics(SM_CXSCREEN)-dlgrect.Width()-20, 0, dlgrect.Width(), dlgrect.Height(), true); ////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// // 获取得第一个按钮和最后一个按钮的位置 GetDlgItem(IDC_QQFRIEND)->GetWindowRect(&rect0); ScreenToClient(&rect0); GetDlgItem(IDC_QQQUN)->GetWindowRect(&rect1); ScreenToClient(&rect1); |
| void CMyQQDlg::ChangeView() { // 开始对按钮进行各个处理 if(TopButtonNum!=1&&clicknum==1) { ////////////////////////////////////////////////////////////////////////// // QQ好友按钮已经置于最上层 // 所以无需移动 // 其余全置于下面 m_QQothers.MoveWindow(0, rect1.bottom, rect0.Width(), rect0.Height(), true); m_QQqun.MoveWindow(0, rect1.bottom-rect0.Height(), rect0.Width(), rect0.Height(), true); ////////////////////////////////////////////////////////////////////////// // QQ好友 if(isBigFace) { m_List1.SetImageList(&m_imagelist2, LVSIL_SMALL); } else { m_List1.SetImageList(&m_imagelist1, LVSIL_SMALL); } m_List1.DeleteAllItems(); for(int i=1; i<34; i++) { m_List1.InsertItem(0xffff,"", -1); m_List1.InsertItem(0xffff,"\n"+myClass[i-1], i); } m_List1.InsertItem(0xffff,"", -1); ////////////////////////////////////////////////////////////////////////// // 显示该栏目的下的QQ好友, 隐藏其它栏目; m_List1.ShowWindow(SW_SHOW); m_List2.ShowWindow(SW_HIDE); treeCtrl.ShowWindow(SW_HIDE); return; } if(TopButtonNum!=2&&clicknum==2) { // 先将排在它上面的按钮置上不闻; m_QQqun.MoveWindow(0, rect0.bottom, rect0.Width(), rect0.Height(), true); // 将排在它后面的按钮置后; m_QQothers.MoveWindow(0, rect1.bottom, rect0.Width(), rect0.Height(), true); // 显示该栏目的下的QQ群, 隐藏其它栏目; m_List1.ShowWindow(SW_HIDE); m_List2.ShowWindow(SW_HIDE); treeCtrl.ShowWindow(S 在百度中搜索更多用Visual C++实现QQ界面的模拟相关网页 转贴于:中国下载站
【中国下载站】【设为主页】【收藏本页】【打印本文】【回到顶部】【关闭此页】 相关文章
文章评论(评论内容只代表网友观点,与本站立场无关!)
栏目导航
分类广告
热门文章
|