[ui] UI fixes and improvements

* Fix missing DD-Image option when no drive is present
* Prevent formatting of a drive when using an image residing on same drive
* Fix ignored bootable checkbox when using a DD-Image
* Fix wrong title for error messages (due to too many concurrent loc messages)
This commit is contained in:
Pete Batard 2014-08-09 00:10:12 +01:00
parent 79a871be63
commit 45714cf5fb
10 changed files with 41 additions and 18 deletions

View file

@ -25,6 +25,7 @@
#include <ctype.h>
#include <commdlg.h>
#include <shellapi.h>
#include <shlwapi.h>
#include <setupapi.h>
#include <direct.h>
@ -350,6 +351,18 @@ static __inline BOOL DeleteFileU(const char* lpFileName)
return ret;
}
static __inline int PathGetDriveNumberU(char* lpPath)
{
int ret = 0;
DWORD err = ERROR_INVALID_DATA;
wconvert(lpPath);
ret = PathGetDriveNumberW(wlpPath);
err = GetLastError();
wfree(lpPath);
SetLastError(err);
return ret;
}
// This function differs from regular GetTextExtentPoint in that it uses a zero terminated string
static __inline BOOL GetTextExtentPointU(HDC hdc, const char* lpString, LPSIZE lpSize)
{