From aea5d542454371b12354e515bad118feaa49391b Mon Sep 17 00:00:00 2001 From: Robert Dickenson Date: Sun, 30 Jun 2002 14:52:10 +0000 Subject: [PATCH] Fixed font bitmap and minor window placement mods. svn path=/trunk/; revision=3166 --- rosapps/taskmgr/GraphCtrl.cpp | 3 -- rosapps/taskmgr/PerformancePage.cpp | 67 +++++++++------------------- rosapps/taskmgr/TASKMGR.cpp | 28 ++++++------ rosapps/taskmgr/font.bmp | Bin 646 -> 646 bytes 4 files changed, 36 insertions(+), 62 deletions(-) diff --git a/rosapps/taskmgr/GraphCtrl.cpp b/rosapps/taskmgr/GraphCtrl.cpp index f802522e819..d4f217ef195 100644 --- a/rosapps/taskmgr/GraphCtrl.cpp +++ b/rosapps/taskmgr/GraphCtrl.cpp @@ -594,7 +594,6 @@ LRESULT CALLBACK GraphCtrl_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA //TGraphCtrl* pGraphCtrl; switch (message) { -/* case WM_ERASEBKGND: return TRUE; // @@ -650,7 +649,6 @@ LRESULT CALLBACK GraphCtrl_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA case WM_SYSKEYDOWN: case WM_SYSKEYUP: return 0; - */ case WM_PAINT: hdc = BeginPaint(hWnd, &ps); // pGraphCtrl = TGraphCtrl::LookupGraphCtrl(hWnd); @@ -690,7 +688,6 @@ LRESULT CALLBACK GraphCtrl_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA } return 0; } - // // We pass on all non-handled messages diff --git a/rosapps/taskmgr/PerformancePage.cpp b/rosapps/taskmgr/PerformancePage.cpp index 5cc703174bd..341931d9b97 100644 --- a/rosapps/taskmgr/PerformancePage.cpp +++ b/rosapps/taskmgr/PerformancePage.cpp @@ -76,20 +76,6 @@ HWND hPerformancePagePhysicalMemorySystemCacheEdit; // Physical Memory System C HWND hPerformancePageTotalsHandleCountEdit; // Total Handles Edit Control HWND hPerformancePageTotalsProcessCountEdit; // Total Processes Edit Control HWND hPerformancePageTotalsThreadCountEdit; // Total Threads Edit Control -#if 0 -HWND hPerformancePageCommitChargeTotalLabel; -HWND hPerformancePageCommitChargeLimitLabel; -HWND hPerformancePageCommitChargePeakLabel; -HWND hPerformancePageKernelMemoryTotalLabel; -HWND hPerformancePageKernelMemoryPagedLabel; -HWND hPerformancePageKernelMemoryNonPagedLabel; -HWND hPerformancePagePhysicalMemoryTotalLabel; -HWND hPerformancePagePhysicalMemoryAvailableLabel; -HWND hPerformancePagePhysicalMemorySystemCacheLabel; -HWND hPerformancePageTotalsHandleCountLabel; -HWND hPerformancePageTotalsProcessCountLabel; -HWND hPerformancePageTotalsThreadCountLabel; -#endif static int nPerformancePageWidth; @@ -150,7 +136,10 @@ LRESULT CALLBACK PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, int nXDifference; int nYDifference; - switch (message) + HDC hdc; + PAINTSTRUCT ps; + + switch (message) { case WM_INITDIALOG: @@ -187,21 +176,8 @@ LRESULT CALLBACK PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, hPerformancePageTotalsHandleCountEdit = GetDlgItem(hDlg, IDC_TOTALS_HANDLE_COUNT); hPerformancePageTotalsProcessCountEdit = GetDlgItem(hDlg, IDC_TOTALS_PROCESS_COUNT); hPerformancePageTotalsThreadCountEdit = GetDlgItem(hDlg, IDC_TOTALS_THREAD_COUNT); -#if 0 - hPerformancePageCommitChargeTotalLabel = GetDlgItem(hDlg, IDS_COMMIT_CHARGE_TOTAL); - hPerformancePageCommitChargeLimitLabel = GetDlgItem(hDlg, IDS_COMMIT_CHARGE_LIMIT); - hPerformancePageCommitChargePeakLabel = GetDlgItem(hDlg, IDS_COMMIT_CHARGE_PEAK); - hPerformancePageKernelMemoryTotalLabel = GetDlgItem(hDlg, IDS_KERNEL_MEMORY_TOTAL); - hPerformancePageKernelMemoryPagedLabel = GetDlgItem(hDlg, IDS_KERNEL_MEMORY_PAGED); - hPerformancePageKernelMemoryNonPagedLabel = GetDlgItem(hDlg, IDS_KERNEL_MEMORY_NONPAGED); - hPerformancePagePhysicalMemoryTotalLabel = GetDlgItem(hDlg, IDS_PHYSICAL_MEMORY_TOTAL); - hPerformancePagePhysicalMemoryAvailableLabel = GetDlgItem(hDlg, IDS_PHYSICAL_MEMORY_AVAILABLE); - hPerformancePagePhysicalMemorySystemCacheLabel = GetDlgItem(hDlg, IDS_PHYSICAL_MEMORY_SYSTEM_CACHE); - hPerformancePageTotalsHandleCountLabel = GetDlgItem(hDlg, IDS_TOTALS_HANDLE_COUNT); - hPerformancePageTotalsProcessCountLabel = GetDlgItem(hDlg, IDS_TOTALS_PROCESS_COUNT); - hPerformancePageTotalsThreadCountLabel = GetDlgItem(hDlg, IDS_TOTALS_THREAD_COUNT); -#endif - hPerformancePageCpuUsageGraph = GetDlgItem(hDlg, IDC_CPU_USAGE_GRAPH); + + hPerformancePageCpuUsageGraph = GetDlgItem(hDlg, IDC_CPU_USAGE_GRAPH); hPerformancePageMemUsageGraph = GetDlgItem(hDlg, IDC_MEM_USAGE_GRAPH); hPerformancePageMemUsageHistoryGraph = GetDlgItem(hDlg, IDC_MEM_USAGE_HISTORY_GRAPH); hPerformancePageCpuUsageHistoryGraph = GetDlgItem(hDlg, IDC_CPU_USAGE_HISTORY_GRAPH); @@ -244,11 +220,27 @@ LRESULT CALLBACK PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, // SetWindowLong(hPerformancePageMemUsageGraph, GWL_WNDPROC, (LONG)GraphCtrl_WndProc); OldGraphCtrlWndProc = SetWindowLong(hPerformancePageMemUsageHistoryGraph, GWL_WNDPROC, (LONG)GraphCtrl_WndProc); SetWindowLong(hPerformancePageCpuUsageHistoryGraph, GWL_WNDPROC, (LONG)GraphCtrl_WndProc); + return TRUE; case WM_COMMAND: break; +#if 0 + case WM_NCPAINT: + hdc = GetDC(hDlg); + //GetClientRect(hDlg, &rc); + //Draw3dRect(hdc, rc.left, rc.top, rc.right, rc.top + 2, GetSysColor(COLOR_3DSHADOW), GetSysColor(COLOR_3DHILIGHT)); + ReleaseDC(hDlg, hdc); + break; + case WM_PAINT: + hdc = BeginPaint(hDlg, &ps); + + //GetClientRect(hDlg, &rc); + //Draw3dRect(hdc, rc.left, rc.top, rc.right, rc.top + 2, GetSysColor(COLOR_3DSHADOW), GetSysColor(COLOR_3DHILIGHT)); + EndPaint(hDlg, &ps); + break; +#endif case WM_SIZE: int cx, cy; @@ -269,20 +261,6 @@ LRESULT CALLBACK PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, AdjustFrameSize(hPerformancePageCommitChargeFrame, hDlg, 0, nYDifference, 0); AdjustFrameSize(hPerformancePageKernelMemoryFrame, hDlg, 0, nYDifference, 0); AdjustFrameSize(hPerformancePagePhysicalMemoryFrame, hDlg, 0, nYDifference, 0); -#if 0 - AdjustControlPostion(hPerformancePageCommitChargeTotalLabel, hDlg, 0, nYDifference); - AdjustControlPostion(hPerformancePageCommitChargeLimitLabel, hDlg, 0, nYDifference); - AdjustControlPostion(hPerformancePageCommitChargePeakLabel, hDlg, 0, nYDifference); - AdjustControlPostion(hPerformancePageKernelMemoryTotalLabel, hDlg, 0, nYDifference); - AdjustControlPostion(hPerformancePageKernelMemoryPagedLabel, hDlg, 0, nYDifference); - AdjustControlPostion(hPerformancePageKernelMemoryNonPagedLabel, hDlg, 0, nYDifference); - AdjustControlPostion(hPerformancePagePhysicalMemoryTotalLabel, hDlg, 0, nYDifference); - AdjustControlPostion(hPerformancePagePhysicalMemoryAvailableLabel, hDlg, 0, nYDifference); - AdjustControlPostion(hPerformancePagePhysicalMemorySystemCacheLabel, hDlg, 0, nYDifference); - AdjustControlPostion(hPerformancePageTotalsHandleCountLabel, hDlg, 0, nYDifference); - AdjustControlPostion(hPerformancePageTotalsProcessCountLabel, hDlg, 0, nYDifference); - AdjustControlPostion(hPerformancePageTotalsThreadCountLabel, hDlg, 0, nYDifference); -#else AdjustCntrlPos(IDS_COMMIT_CHARGE_TOTAL, hDlg, 0, nYDifference); AdjustCntrlPos(IDS_COMMIT_CHARGE_LIMIT, hDlg, 0, nYDifference); AdjustCntrlPos(IDS_COMMIT_CHARGE_PEAK, hDlg, 0, nYDifference); @@ -295,7 +273,6 @@ LRESULT CALLBACK PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, AdjustCntrlPos(IDS_TOTALS_HANDLE_COUNT, hDlg, 0, nYDifference); AdjustCntrlPos(IDS_TOTALS_PROCESS_COUNT, hDlg, 0, nYDifference); AdjustCntrlPos(IDS_TOTALS_THREAD_COUNT, hDlg, 0, nYDifference); -#endif AdjustControlPostion(hPerformancePageCommitChargeTotalEdit, hDlg, 0, nYDifference); AdjustControlPostion(hPerformancePageCommitChargeLimitEdit, hDlg, 0, nYDifference); diff --git a/rosapps/taskmgr/TASKMGR.cpp b/rosapps/taskmgr/TASKMGR.cpp index c98a5a98a3b..7f8e0994942 100644 --- a/rosapps/taskmgr/TASKMGR.cpp +++ b/rosapps/taskmgr/TASKMGR.cpp @@ -481,12 +481,22 @@ BOOL OnCreate(HWND hWnd) //nOldStartX = rc.left; //nOldStartY = rc.top; +#define PAGE_OFFSET_LEFT 17 +#define PAGE_OFFSET_TOP 72 +#define PAGE_OFFSET_WIDTH (PAGE_OFFSET_LEFT*2) +#define PAGE_OFFSET_HEIGHT (PAGE_OFFSET_TOP+32) + if ((TaskManagerSettings.Left != 0) || (TaskManagerSettings.Top != 0) || (TaskManagerSettings.Right != 0) || (TaskManagerSettings.Bottom != 0)) { MoveWindow(hWnd, TaskManagerSettings.Left, TaskManagerSettings.Top, TaskManagerSettings.Right - TaskManagerSettings.Left, TaskManagerSettings.Bottom - TaskManagerSettings.Top, TRUE); +#ifdef GCC + MoveWindow(hApplicationPage, TaskManagerSettings.Left + PAGE_OFFSET_LEFT, TaskManagerSettings.Top + PAGE_OFFSET_TOP, TaskManagerSettings.Right - TaskManagerSettings.Left - PAGE_OFFSET_WIDTH, TaskManagerSettings.Bottom - TaskManagerSettings.Top - PAGE_OFFSET_HEIGHT, FALSE); + MoveWindow(hProcessPage, TaskManagerSettings.Left + PAGE_OFFSET_LEFT, TaskManagerSettings.Top + PAGE_OFFSET_TOP, TaskManagerSettings.Right - TaskManagerSettings.Left - PAGE_OFFSET_WIDTH, TaskManagerSettings.Bottom - TaskManagerSettings.Top - PAGE_OFFSET_HEIGHT, FALSE); + MoveWindow(hPerformancePage, TaskManagerSettings.Left + PAGE_OFFSET_LEFT, TaskManagerSettings.Top + PAGE_OFFSET_TOP, TaskManagerSettings.Right - TaskManagerSettings.Left - PAGE_OFFSET_WIDTH, TaskManagerSettings.Bottom - TaskManagerSettings.Top - PAGE_OFFSET_HEIGHT, FALSE); +#endif } if (TaskManagerSettings.Maximized) ShowWindow(hWnd, SW_MAXIMIZE); @@ -603,20 +613,10 @@ BOOL OnCreate(HWND hWnd) // It moves every child window that needs moving void OnMove( UINT nType, int cx, int cy ) { -#if 0 - RECT rc; - - nOldStartX = cx; - nOldStartY = cy; - - GetWindowRect(hTabWnd, &rc); - rc.left += 2;//nOldStartX; - rc.top += 2;//nOldStartY; - rc.right -= 4; - rc.bottom -= 4; - SetWindowPos(hApplicationPage, NULL, rc.left, rc.top, rc.right, rc.bottom, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOMOVE|SWP_NOZORDER); - SetWindowPos(hProcessPage, NULL, rc.left, rc.top, rc.right, rc.bottom, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOMOVE|SWP_NOZORDER); - SetWindowPos(hPerformancePage, NULL, rc.left, rc.top, rc.right, rc.bottom, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOMOVE|SWP_NOZORDER); +#ifdef GCC + MoveWindow(hApplicationPage, TaskManagerSettings.Left + PAGE_OFFSET_LEFT, TaskManagerSettings.Top + PAGE_OFFSET_TOP, TaskManagerSettings.Right - TaskManagerSettings.Left - PAGE_OFFSET_WIDTH, TaskManagerSettings.Bottom - TaskManagerSettings.Top - PAGE_OFFSET_HEIGHT, FALSE); + MoveWindow(hProcessPage, TaskManagerSettings.Left + PAGE_OFFSET_LEFT, TaskManagerSettings.Top + PAGE_OFFSET_TOP, TaskManagerSettings.Right - TaskManagerSettings.Left - PAGE_OFFSET_WIDTH, TaskManagerSettings.Bottom - TaskManagerSettings.Top - PAGE_OFFSET_HEIGHT, FALSE); + MoveWindow(hPerformancePage, TaskManagerSettings.Left + PAGE_OFFSET_LEFT, TaskManagerSettings.Top + PAGE_OFFSET_TOP, TaskManagerSettings.Right - TaskManagerSettings.Left - PAGE_OFFSET_WIDTH, TaskManagerSettings.Bottom - TaskManagerSettings.Top - PAGE_OFFSET_HEIGHT, FALSE); #endif } diff --git a/rosapps/taskmgr/font.bmp b/rosapps/taskmgr/font.bmp index 7de02b6613aa90e0fe05f0eeb633c2729309608b..5b2edba5c27494cb0bf5648b45bce3f5358a68ec 100644 GIT binary patch literal 646 zcmb7B!3_d23^RyVkq~1r2Y+^83f_G&N8X*H5B4gyd#wQRxXaavlR8nOyWXCA*dFv3 z;!Yfi9S-!snfI?#hYQnXfCoAEKu?NVE2A!&4_Xr=_^Cu!N(m%5nggNu%Y${c%31HE z*F?khugIY&8}xxl%N(|9C@ls^%x9z~ZJFWzT>67SQ@TtY_v4bYa2*O}v9d n66NZ1GVYc{AqMn*ExcAwrR3}NiSzq^)qBQ{>L2_wdMwQ$_gy0N7=vKzOz`|AkXlkrM_ z(9iS(PK>~1KKJG$6o3n*Ou$Hr)*4X<-3z^o(fKIFP-{)5Quv2cMxhsyD9hm_<_iV_ zb%#C?;l85}Xy!r^^999r^bfehsQ0Y%%)e$&>FGm1RZsU|&X*C8+x-=H=v5R9s>jN; c9|`5>ed<0Lxm{0Xu;}}rs^6G*jeM8w4TI6Bwg3PC