Dlg_ToolBar.cpp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  1. // Dlg_ToolBar.cpp : 实现文件
  2. //
  3. #include "stdafx.h"
  4. #include "Dlg_ToolBar.h"
  5. #include "Global.h"
  6. #include ".\dlg_toolbar.h"
  7. #include "DlgUserManager.h"
  8. #include "Dlg_GroupManage.h"
  9. #include "ScriptSetDlg.h"
  10. #include "DlgEditPwd.h"
  11. #include "DlgQueryWarningRec.h"
  12. #include "DlgSystemLog.h"
  13. #include "DlgNoticeRec.h"
  14. #include "SystemParaSetDlg.h"
  15. #include "MainFrm.h"
  16. // CDlg_ToolBar 对话框
  17. IMPLEMENT_DYNAMIC(CDlg_ToolBar, CDialog)
  18. CDlg_ToolBar::CDlg_ToolBar(CWnd* pParent /*=NULL*/)
  19. : CDialog(CDlg_ToolBar::IDD, pParent)
  20. {
  21. }
  22. CDlg_ToolBar::~CDlg_ToolBar()
  23. {
  24. }
  25. void CDlg_ToolBar::DoDataExchange(CDataExchange* pDX)
  26. {
  27. CDialog::DoDataExchange(pDX);
  28. DDX_Control(pDX, IDC_STA_CLOCK, m_clock);
  29. }
  30. BEGIN_MESSAGE_MAP(CDlg_ToolBar, CDialog)
  31. ON_WM_PAINT()
  32. ON_WM_MOUSEMOVE()
  33. ON_WM_LBUTTONDOWN()
  34. ON_WM_LBUTTONUP()
  35. ON_WM_TIMER()
  36. END_MESSAGE_MAP()
  37. // CDlg_ToolBar 消息处理程序
  38. BOOL CDlg_ToolBar::OnInitDialog()
  39. {
  40. CDialog::OnInitDialog();
  41. // TODO: 在此添加额外的初始化
  42. char picDir[_MAX_PATH] = {0};
  43. strcpy(picDir, g_strDirectory);
  44. strcat(picDir, "\\");
  45. strcat(picDir, _BITMAPDIR);
  46. strcat(picDir, "topbar.bmp" );
  47. DisplayBMP( 0,0,1920,79,picDir,false );
  48. int screenx=GetSystemMetrics(SM_CXSCREEN);
  49. int screeny=GetSystemMetrics(SM_CYSCREEN);
  50. GetDlgItem(IDC_STA_CLOCK)->MoveWindow( CRect(screenx-120,5,screenx,30) );
  51. CTime time=CTime::GetCurrentTime();
  52. int nHour=time.GetHour();
  53. int nMinute=time.GetMinute();
  54. int nSecond=time.GetSecond();
  55. m_clock.SetBkColor(RGB(9,52,86));//7,58,103
  56. m_clock.SetTextColor(RGB(0,255,0));
  57. m_clock.SetClock(nHour,nMinute,nSecond);
  58. SetTimer( 1,100,NULL );
  59. return TRUE; // return TRUE unless you set the focus to a control
  60. // 异常: OCX 属性页应返回 FALSE
  61. }
  62. void CDlg_ToolBar::SetPos( int iWidth,int iHeight )
  63. {
  64. CRect rc1;
  65. rc1.left = 0;
  66. rc1.right = rc1.left+1920;
  67. rc1.top = 0;
  68. rc1.bottom = rc1.top+iHeight;
  69. this->MoveWindow( rc1 );
  70. CRect rc2;
  71. rc2.left = 0;
  72. rc2.right = 1920;
  73. rc2.top = 0;
  74. rc2.bottom = 79;
  75. GetDlgItem(IDC_STATIC1)->MoveWindow( rc2 );
  76. //_rtClient = rc1;
  77. _rtClient.left = 7;
  78. _rtClient.top = 52;
  79. _rtClient.right = 825;
  80. _rtClient.bottom = 79;
  81. //CRect rc3;
  82. //rc3.left = 0;
  83. //rc3.right = iWidth;
  84. //rc3.top = 85;
  85. //rc3.bottom = 120;
  86. //GetDlgItem(IDC_STATIC2)->MoveWindow( rc3 );
  87. }
  88. void CDlg_ToolBar::OnPaint()
  89. {
  90. CPaintDC dc(this); // device context for painting
  91. // TODO: 在此处添加消息处理程序代码
  92. // 不为绘图消息调用 CDialog::OnPaint()
  93. char picDir[_MAX_PATH] = {0};
  94. strcpy(picDir, g_strDirectory);
  95. strcat(picDir, "\\");
  96. strcat(picDir, _BITMAPDIR);
  97. strcat(picDir, "topbar.bmp" );
  98. DisplayBMP( 0,0,1920,79,picDir,false );//DisplayBMP( 0,0,2400,106,picDir,false );
  99. }
  100. BOOL CDlg_ToolBar::DisplayBMP( int nX1,int nY1,int nXX,int nYY,CString strBMPFile,BOOL bStretch )
  101. {
  102. #if 0
  103. CClientDC dc( this );
  104. GdiplusStartupInput m_gdiplusStartupInput;
  105. // ULONG_PTR m_pGdiToken;
  106. wchar_t m_wstrServerName[255] ;
  107. MultiByteToWideChar(CP_ACP,0,strBMPFile,-1,m_wstrServerName,256);
  108. Graphics graphics( dc );
  109. //wchar_t * p=strJPGFile.AllocSysStrinig();
  110. Image image( m_wstrServerName, FALSE) ;
  111. //if(bStretch)
  112. //{
  113. // StretchBlt(hDC,nX1,nY1,nXX,nYY,hMemDC,0,0,Width,Height,SRCCOPY);
  114. //}
  115. //else
  116. //{
  117. // Width = min(Width,nXX);
  118. // Height = min(Height,nYY);
  119. // BitBlt(hDC,nX1,nY1,Width,Height,hMemDC,0,0,SRCCOPY);
  120. //}
  121. if(bStretch)
  122. {
  123. graphics.DrawImage( &image, nX1,nY1,nXX,nYY );
  124. }
  125. else
  126. {
  127. WORD Width = (WORD)image.GetWidth();
  128. WORD Height = (WORD)image.GetHeight();
  129. //Width = min(Width,nXX);
  130. //Height = min(Height,nYY);
  131. //graphics.DrawImage( &image, nX1,nY1,Width,Height );
  132. graphics.DrawImage( &image, nX1,nY1,0,0,nXX,nYY,UnitPixel );
  133. }
  134. return true;
  135. #else
  136. CClientDC dc( this );
  137. OFSTRUCT of;
  138. unsigned fh = OpenFile ((char const*)strBMPFile, &of, OF_READ);
  139. if(fh==-1) return FALSE;
  140. DWORD size = (DWORD)(sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD));
  141. HANDLE hDIBInfo = GlobalAlloc(GMEM_MOVEABLE,size);
  142. SetStretchBltMode(dc,HALFTONE);
  143. BITMAPFILEHEADER bf;
  144. LPBITMAPINFOHEADER lpbi;
  145. lpbi = (LPBITMAPINFOHEADER)GlobalLock(hDIBInfo);
  146. _lread(fh,(LPSTR)&bf,sizeof (bf));
  147. _lread(fh,(LPSTR)lpbi,sizeof(BITMAPINFOHEADER));
  148. WORD nClrs = (WORD)lpbi->biClrUsed;
  149. size = ((((lpbi->biWidth*lpbi->biBitCount)+31)&~31)>>3)*lpbi->biHeight;
  150. if(nClrs==0 && lpbi->biBitCount!=24) nClrs = 1<<lpbi->biBitCount;
  151. if(lpbi->biClrUsed == 0) lpbi->biClrUsed = (DWORD)nClrs;
  152. if(lpbi->biSizeImage == 0) lpbi->biSizeImage = size;
  153. WORD Size = (WORD)lpbi->biSize;
  154. WORD Width = (WORD)lpbi->biWidth;
  155. WORD Height = (WORD)lpbi->biHeight;
  156. WORD ClrUsed = (WORD)lpbi->biClrUsed;
  157. WORD BitCount = (WORD)lpbi->biBitCount;
  158. DWORD SizeImage = lpbi->biSizeImage;
  159. WORD SizeRGB = nClrs*sizeof(RGBQUAD);
  160. WORD SizeHeader = Size+SizeRGB;
  161. GlobalUnlock(hDIBInfo);
  162. hDIBInfo = GlobalReAlloc(hDIBInfo,SizeHeader+SizeImage, 0);
  163. lpbi = (LPBITMAPINFOHEADER)GlobalLock(hDIBInfo);
  164. _lread(fh,(LPSTR)(lpbi)+Size,SizeRGB);
  165. if(bf.bfOffBits!=0L) _llseek(fh,bf.bfOffBits,SEEK_SET);
  166. DWORD ul = SizeImage;
  167. BYTE *hp = (BYTE *)((LPSTR)lpbi + SizeHeader);
  168. while(ul>30000L)
  169. {
  170. _lread(fh,(LPSTR)hp,30000L);
  171. ul -= 30000L;
  172. hp += 30000L;
  173. }
  174. _lread(fh,(LPSTR)hp,(WORD)ul);
  175. _lclose(fh);
  176. HPALETTE hPalette,hOldPal;
  177. HANDLE hPalHeader = NULL;
  178. HDC hDC = dc.m_hDC;
  179. LPBITMAPINFOHEADER lpHeader = lpbi;
  180. WORD wDIBUse = DIB_RGB_COLORS;
  181. if(ClrUsed)
  182. {
  183. WORD size = sizeof(LOGPALETTE) + ClrUsed * sizeof(PALETTEENTRY);
  184. NPLOGPALETTE npPal = (NPLOGPALETTE)LocalAlloc(LMEM_FIXED,size);
  185. npPal->palVersion = 0x300;
  186. npPal->palNumEntries = ClrUsed;
  187. RGBQUAD FAR *lpRGB = (RGBQUAD FAR *)((LPSTR)lpbi + Size);
  188. for(WORD i=0;i<ClrUsed;i++,lpRGB++)
  189. {
  190. npPal->palPalEntry[i].peRed = lpRGB->rgbRed;
  191. npPal->palPalEntry[i].peGreen = lpRGB->rgbGreen;
  192. npPal->palPalEntry[i].peBlue = lpRGB->rgbBlue;
  193. npPal->palPalEntry[i].peFlags = 0;
  194. }
  195. hPalette = CreatePalette((LPLOGPALETTE)npPal);
  196. LocalFree((HANDLE)npPal);
  197. hOldPal = SelectPalette(hDC,hPalette,FALSE);
  198. RealizePalette(hDC);
  199. if(BitCount!=24)
  200. {
  201. size = Size+ClrUsed*sizeof(WORD);
  202. hPalHeader = GlobalAlloc(GMEM_MOVEABLE,size);
  203. LPBITMAPINFOHEADER lpPalInfo;
  204. lpPalInfo = (LPBITMAPINFOHEADER)GlobalLock(hPalHeader);
  205. *lpPalInfo = *lpbi;
  206. WORD FAR *lpTable = (WORD FAR *)((LPSTR)lpPalInfo + Size);
  207. for(WORD i=0;i<ClrUsed;i++) *lpTable++ = i;
  208. GlobalUnlock(hPalHeader);
  209. lpHeader = (LPBITMAPINFOHEADER) GlobalLock(hPalHeader);
  210. wDIBUse = DIB_PAL_COLORS;
  211. }
  212. }
  213. HDC hMemDC = CreateCompatibleDC(hDC);
  214. HBITMAP hDDBitmap = CreateCompatibleBitmap(hDC,Width,Height);
  215. SetDIBits(hDC,hDDBitmap,0,Height,(LPSTR)lpbi + SizeHeader,
  216. (LPBITMAPINFO)lpHeader,wDIBUse);
  217. HBITMAP hOldBitmap = (HBITMAP)SelectObject(hMemDC,hDDBitmap);
  218. if(bStretch)
  219. {
  220. StretchBlt(hDC,nX1,nY1,nXX,nYY,hMemDC,0,0,Width,Height,SRCCOPY);
  221. }
  222. else
  223. {
  224. Width = min(Width,nXX);
  225. Height = min(Height,nYY);
  226. BitBlt(hDC,nX1,nY1,Width,Height,hMemDC,0,0,SRCCOPY);
  227. }
  228. SelectObject(hMemDC,hOldBitmap);
  229. DeleteDC(hMemDC);
  230. DeleteObject(hDDBitmap);
  231. DeleteObject( dc );
  232. if(ClrUsed)
  233. {
  234. SelectPalette(hDC,hOldPal,FALSE);
  235. DeleteObject(hPalette);
  236. if(BitCount!=24)
  237. {
  238. GlobalUnlock(hPalHeader);
  239. GlobalFree(hPalHeader);
  240. }
  241. }
  242. DeleteObject( hDC );
  243. GlobalUnlock(hDIBInfo);
  244. GlobalFree(hDIBInfo);
  245. int screenx=GetSystemMetrics(SM_CXSCREEN);
  246. CClientDC dc2( this );
  247. dc2.SetBkMode( TRANSPARENT );
  248. dc2.SetTextColor( RGB(62,132,192) );
  249. CString sShow;
  250. sShow.Format( "【ver:%s】",g_strVersion );
  251. dc2.TextOut( screenx-110,58,sShow );
  252. DeleteObject( dc2 );
  253. return TRUE;
  254. #endif
  255. }
  256. void CDlg_ToolBar::OnMouseMove(UINT nFlags, CPoint point)
  257. {
  258. // TODO: 在此添加消息处理程序代码和/或调用默认值
  259. int screenx=GetSystemMetrics(SM_CXSCREEN); // 获取屏幕宽度 [8/27/2013 Zero]
  260. //CRect RectVer(screenx-110,5,screenx,23);
  261. CRect RectVer(screenx-110,8,screenx,28);
  262. //if( RectVer.PtInRect( point ) )
  263. if( _rtClient.PtInRect( point ) )
  264. {
  265. HCURSOR hCursor;
  266. hCursor = AfxGetApp() -> LoadCursor(IDC_HANDCUR);
  267. ::SetCursor(hCursor);
  268. return;
  269. }
  270. CRect rect[10];
  271. GetDlgItem(IDC_PIC1)->GetWindowRect( rect[0] ); ScreenToClient( &rect[0] );
  272. GetDlgItem(IDC_PIC2)->GetWindowRect( rect[1] ); ScreenToClient( &rect[1] );
  273. GetDlgItem(IDC_PIC3)->GetWindowRect( rect[2] ); ScreenToClient( &rect[2] );
  274. GetDlgItem(IDC_PIC4)->GetWindowRect( rect[3] ); ScreenToClient( &rect[3] );
  275. GetDlgItem(IDC_PIC5)->GetWindowRect( rect[4] ); ScreenToClient( &rect[4] );
  276. GetDlgItem(IDC_PIC6)->GetWindowRect( rect[5] ); ScreenToClient( &rect[5] );
  277. GetDlgItem(IDC_PIC7)->GetWindowRect( rect[6] ); ScreenToClient( &rect[6] );
  278. GetDlgItem(IDC_PIC8)->GetWindowRect( rect[7] ); ScreenToClient( &rect[7] );
  279. GetDlgItem(IDC_PIC9)->GetWindowRect( rect[8] ); ScreenToClient( &rect[8] );
  280. GetDlgItem(IDC_PIC10)->GetWindowRect( rect[9] );ScreenToClient( &rect[9] );
  281. for( int i=0;i<10;i++ )
  282. {
  283. if( rect[i].PtInRect( point ) )
  284. {
  285. HCURSOR hCursor;
  286. hCursor = AfxGetApp() -> LoadCursor(IDC_HANDCUR);
  287. ::SetCursor(hCursor);
  288. break;
  289. }
  290. }
  291. CDialog::OnMouseMove(nFlags, point);
  292. }
  293. void CDlg_ToolBar::OnLButtonDown(UINT nFlags, CPoint point)
  294. {
  295. // TODO: 在此添加消息处理程序代码和/或调用默认值
  296. int screenx = GetSystemMetrics(SM_CXSCREEN);// 获取屏幕宽度 [8/27/2013 Zero]
  297. CRect RectVer(screenx-110,5,screenx,23);
  298. //if( RectVer.PtInRect( point ) )
  299. if( _rtClient.PtInRect( point ) )
  300. {
  301. HCURSOR hCursor;
  302. hCursor = AfxGetApp() -> LoadCursor(IDC_HANDCUR);
  303. ::SetCursor(hCursor);
  304. return;
  305. }
  306. CRect rect[10];
  307. GetDlgItem(IDC_PIC1)->GetWindowRect( rect[0] ); ScreenToClient( &rect[0] );
  308. GetDlgItem(IDC_PIC2)->GetWindowRect( rect[1] ); ScreenToClient( &rect[1] );
  309. GetDlgItem(IDC_PIC3)->GetWindowRect( rect[2] ); ScreenToClient( &rect[2] );
  310. GetDlgItem(IDC_PIC4)->GetWindowRect( rect[3] ); ScreenToClient( &rect[3] );
  311. GetDlgItem(IDC_PIC5)->GetWindowRect( rect[4] ); ScreenToClient( &rect[4] );
  312. GetDlgItem(IDC_PIC6)->GetWindowRect( rect[5] ); ScreenToClient( &rect[5] );
  313. GetDlgItem(IDC_PIC7)->GetWindowRect( rect[6] ); ScreenToClient( &rect[6] );
  314. GetDlgItem(IDC_PIC8)->GetWindowRect( rect[7] ); ScreenToClient( &rect[7] );
  315. GetDlgItem(IDC_PIC9)->GetWindowRect( rect[8] ); ScreenToClient( &rect[8] );
  316. GetDlgItem(IDC_PIC10)->GetWindowRect( rect[9] );ScreenToClient( &rect[9] );
  317. for( int i=0;i<10;i++ )
  318. {
  319. if( rect[i].PtInRect( point ) )
  320. {
  321. HCURSOR hCursor;
  322. hCursor = AfxGetApp() -> LoadCursor(IDC_CURSOR2);
  323. ::SetCursor(hCursor);
  324. break;
  325. }
  326. }
  327. CDialog::OnLButtonDown(nFlags, point);
  328. }
  329. void CDlg_ToolBar::OnLButtonUp(UINT nFlags, CPoint point)
  330. {
  331. // TODO: 在此添加消息处理程序代码和/或调用默认值
  332. CMainFrame *pMainFrm=(CMainFrame*)AfxGetApp()->m_pMainWnd;
  333. if( pMainFrm==NULL )
  334. return;
  335. int screenx=GetSystemMetrics(SM_CXSCREEN);// 获取屏幕宽度 [8/27/2013 Zero]
  336. CRect RectVer(screenx-110,5,screenx,23);
  337. //CRect RectVer(7,,screenx,23);
  338. #if 0
  339. //if( RectVer.PtInRect( point ) )
  340. if( _rtClient.PtInRect( point ) )
  341. {
  342. if( pDevicesManager->m_sServerVer!="" )
  343. {
  344. HCURSOR hCursor;
  345. hCursor = AfxGetApp() -> LoadCursor(IDC_HANDCUR);
  346. ::SetCursor(hCursor);
  347. CString show;
  348. show.Format( "服务端版本 : %s \n客户端版本 : %s ",pDevicesManager->m_sServerVer,g_strVersion );
  349. MessageBox( show,0 );
  350. }
  351. return;
  352. }
  353. #endif
  354. CRect rect[10];
  355. GetDlgItem(IDC_PIC1)->GetWindowRect( rect[0] );
  356. ScreenToClient( &rect[0] );
  357. GetDlgItem(IDC_PIC2)->GetWindowRect( rect[1] );
  358. ScreenToClient( &rect[1] );
  359. GetDlgItem(IDC_PIC3)->GetWindowRect( rect[2] );
  360. ScreenToClient( &rect[2] );
  361. GetDlgItem(IDC_PIC4)->GetWindowRect( rect[3] );
  362. ScreenToClient( &rect[3] );
  363. GetDlgItem(IDC_PIC5)->GetWindowRect( rect[4] );
  364. ScreenToClient( &rect[4] );
  365. GetDlgItem(IDC_PIC6)->GetWindowRect( rect[5] );
  366. ScreenToClient( &rect[5] );
  367. GetDlgItem(IDC_PIC7)->GetWindowRect( rect[6] );
  368. ScreenToClient( &rect[6] );
  369. GetDlgItem(IDC_PIC8)->GetWindowRect( rect[7] );
  370. ScreenToClient( &rect[7] );
  371. GetDlgItem(IDC_PIC9)->GetWindowRect( rect[8] );
  372. ScreenToClient( &rect[8] );
  373. GetDlgItem(IDC_PIC10)->GetWindowRect( rect[9] );
  374. ScreenToClient( &rect[9] );
  375. GetDlgItem(IDC_PIC1)->GetClientRect( rect[0] );
  376. ClientToScreen(&rect[0]);
  377. GetDlgItem(IDC_PIC2)->GetClientRect( rect[1] );
  378. ClientToScreen(&rect[1]);
  379. GetDlgItem(IDC_PIC3)->GetClientRect( rect[2] );
  380. ClientToScreen(&rect[2]);
  381. GetDlgItem(IDC_PIC4)->GetClientRect( rect[3] );
  382. ClientToScreen(&rect[3]);
  383. GetDlgItem(IDC_PIC5)->GetClientRect( rect[4] );
  384. ClientToScreen(&rect[4]);
  385. GetDlgItem(IDC_PIC6)->GetClientRect( rect[5] );
  386. ClientToScreen(&rect[5]);
  387. GetDlgItem(IDC_PIC7)->GetClientRect( rect[6] );
  388. ClientToScreen(&rect[6]);
  389. GetDlgItem(IDC_PIC8)->GetClientRect( rect[7] );
  390. ClientToScreen(&rect[7]);
  391. GetDlgItem(IDC_PIC9)->GetClientRect( rect[8] );
  392. ClientToScreen(&rect[8]);
  393. GetDlgItem(IDC_PIC10)->GetClientRect( rect[9] );
  394. ClientToScreen(&rect[9]);
  395. int nType = -1;
  396. for( int i=0;i<10;i++ )
  397. {
  398. if( rect[i].PtInRect( point ) )
  399. {
  400. HCURSOR hCursor;
  401. hCursor = AfxGetApp() -> LoadCursor(IDC_HANDCUR);
  402. ::SetCursor(hCursor);
  403. nType = i;
  404. break;
  405. }
  406. }
  407. switch( nType )
  408. {
  409. case 0:
  410. //{
  411. // CHAR szMaxID[MAX_ID + 1] = {0};
  412. // CDBInterface::GetInstancePtr()->GetMaxID("t_data_rec", "id", szMaxID);
  413. //}
  414. pMainFrm->OnEvent();
  415. break;
  416. case 1:
  417. pMainFrm->OnNoticeRec();
  418. break;
  419. case 2:
  420. pMainFrm->OnSummaryLog();
  421. break;
  422. case 3:
  423. pMainFrm->OnSystemLog();
  424. break;
  425. case 4:
  426. pMainFrm->OnSingleAnalog();
  427. break;
  428. case 5:
  429. pMainFrm->OnUsers();
  430. break;
  431. case 6:
  432. pMainFrm->OnEditPwdTool();
  433. break;
  434. case 7:
  435. pMainFrm->OnSysPara();
  436. break;
  437. case 8:
  438. pMainFrm->m_hleftDockBar.ShowWindow(SW_SHOW);
  439. pMainFrm->m_hleftDockBar.SendMessage(WM_MY_INVALIDATE,0,0 );
  440. break;
  441. case 9:
  442. pMainFrm->OnSuperEnd();
  443. return;
  444. }
  445. CDialog::OnLButtonUp(nFlags, point);
  446. }
  447. void CDlg_ToolBar::OnTimer(UINT nIDEvent)
  448. {
  449. // TODO: 在此添加消息处理程序代码和/或调用默认值
  450. CTime time=CTime::GetCurrentTime();
  451. int nHour=time.GetHour();
  452. int nMinute=time.GetMinute();
  453. int nSecond=time.GetSecond();
  454. m_clock.SetClock(nHour,nMinute,nSecond);
  455. CDialog::OnTimer(nIDEvent);
  456. }