From 8f5cfcb9b5fd1aaffa2627845d88392f01d12ca8 Mon Sep 17 00:00:00 2001 From: owomomo Date: Sat, 6 Apr 2019 02:09:05 +0800 Subject: [PATCH] Update ram_search.cpp --- src/drivers/win/ram_search.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/drivers/win/ram_search.cpp b/src/drivers/win/ram_search.cpp index 387b67a7..b3896160 100644 --- a/src/drivers/win/ram_search.cpp +++ b/src/drivers/win/ram_search.cpp @@ -1534,7 +1534,7 @@ LRESULT CALLBACK RamSearchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara CompactAddrs(); } void init_list_box(HWND Box, const char* Strs[], int numColumns, int *columnWidths); - init_list_box(GetDlgItem(hDlg,IDC_RAMLIST),names,5,widths); + init_list_box(GetDlgItem(hDlg,IDC_RAMLIST),names,4,widths); //ListView_SetItemCount(GetDlgItem(hDlg,IDC_RAMLIST),ResultCount); if (!noMisalign) SendDlgItemMessage(hDlg, IDC_MISALIGN, BM_SETCHECK, BST_CHECKED, 0); //if (littleEndian) SendDlgItemMessage(hDlg, IDC_ENDIAN, BM_SETCHECK, BST_CHECKED, 0); @@ -2183,10 +2183,7 @@ void init_list_box(HWND Box, const char* Strs[], int numColumns, int *columnWidt Col.mask = LVCF_FMT | LVCF_ORDER | LVCF_SUBITEM | LVCF_TEXT | LVCF_WIDTH; for (int i = 0; i < numColumns; i++) { - if (i == 1) - Col.fmt = LVCFMT_RIGHT; - else - Col.fmt = LVCFMT_LEFT; + Col.fmt = !strcmp(Strs[i], "Value") || !strcmp(Strs[i], "Previous") || !strcmp(Strs[i], "Changes") ? LVCFMT_RIGHT : LVCFMT_LEFT; Col.iOrder = i; Col.iSubItem = i; Col.pszText = (LPSTR)(Strs[i]); @@ -2247,4 +2244,4 @@ void SetSearchType(int SearchType) { void DoRamSearchOperation() { RamSearchProc(RamSearchHWnd, WM_COMMAND, IDC_C_SEARCH, 0); return; -} \ No newline at end of file +}