LouZhang

导航

2012年9月28日

对话框学习4

摘要: 基于对话框的拖盘程序首先为C**Dlg类添加自定义消息WM_TRAY_NOTIFICATION并添加代码如下:afx_msg LRESULT CTrayDlg::OnTrayNotification(WPARAM wParam, LPARAM lParam){ switch (lParam){ case WM_RBUTTONUP: case WM_LBUTTONDBLCLK: ShowWindow(SW_SHOW); TrayMessage(m_hWnd, NIM_DELETE, NULL, ""); } return 0;}响应方式为... 阅读全文

posted @ 2012-09-28 13:27 louzhang_swk 阅读(299) 评论(0) 推荐(0) 编辑

对话框学习3

摘要: 学习一个收缩对话框的方法在C***Dlg类中的OnInitDialog函数里CRect winRect; GetWindowRect(winRect); m_winWidth = winRect.right; /*CString str; str.Format("%d", winRect.Width()); AfxMessageBox(str);*/ CRect btRect; GetDlgItem(IDC_BUTTON1)->GetWindowRect(btRect); m_shrinkWidth = btRect.right; winR... 阅读全文

posted @ 2012-09-28 12:01 louzhang_swk 阅读(162) 评论(0) 推荐(0) 编辑