mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-23 11:17:03 -04:00
[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:
parent
79a871be63
commit
45714cf5fb
10 changed files with 41 additions and 18 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue