[ui] use our own custom bar with text

* Needed because native Windows produces obnoxious tearing on redrawing.
* Also rename global partition scheme variable back to 'pt'
* Also fix major and minor version numbers in the .rc
This commit is contained in:
Pete Batard 2018-04-16 17:05:23 +02:00
parent 2fbe7be870
commit 7fef3c6434
5 changed files with 79 additions and 44 deletions

View file

@ -413,16 +413,7 @@ static uint64_t last_msg_time[2] = { 0, 0 };
static void PrintInfoMessage(char* msg) {
SetWindowTextU(hProgress, msg);
// Make sure our field gets redrawn
// If the progress bar is not active, it looks like WM_PAINT is
// ignored. But InvalidateRect is causing refresh tearing so we
// don't want to use that while active.
// Refresh still sucks though and marquee no longer works... :(
// TODO: Create our own progress bar control with text overlay and inverted text
if (!progress_in_use)
InvalidateRect(hProgress, NULL, TRUE);
else
SendMessage(hProgress, WM_PAINT, 0, 0);
InvalidateRect(hProgress, NULL, TRUE);
}
static void PrintStatusMessage(char* msg) {
SendMessageLU(hStatus, SB_SETTEXTW, SBT_OWNERDRAW | SB_SECTION_LEFT, msg);