Skip to content

Commit

Permalink
Up to 0.9.9
Browse files Browse the repository at this point in the history
* Fix a crash for Win10x64/TCx32
  • Loading branch information
little-brother committed Mar 31, 2022
1 parent 2b1313f commit 3f331d3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
#define MAX_LENGTH 4096
#define MAX_COLUMN_LENGTH 2000
#define APP_NAME TEXT("xmltab")
#define APP_VERSION TEXT("0.9.8")
#define APP_VERSION TEXT("0.9.9")
#define LOADING TEXT("Loading...")
#define WHITESPACE " \t\r\n"

Expand Down Expand Up @@ -1727,9 +1727,12 @@ LRESULT CALLBACK cbNewMain(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
SendMessage(hWnd, WMU_UPDATE_FILTER_SIZE, 0, 0);

// Bug fix: force Windows to redraw header
int w = ListView_GetColumnWidth(hGridWnd, 0);
ListView_SetColumnWidth(hGridWnd, 0, w + 1);
ListView_SetColumnWidth(hGridWnd, 0, w);
if (IsWindowVisible(hGridWnd)) { // Win10x64, TCx32
int w = ListView_GetColumnWidth(hGridWnd, 0);
ListView_SetColumnWidth(hGridWnd, 0, w + 1);
ListView_SetColumnWidth(hGridWnd, 0, w);
}

SendMessage(hWnd, WM_SETREDRAW, TRUE, 0);
InvalidateRect(hWnd, NULL, TRUE);
}
Expand Down

0 comments on commit 3f331d3

Please sign in to comment.