1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[internal] use DialogIndirect to reduce the number of dialogs in the RC

* Since Microsoft forces our hand, we hack away into our compiled RC
  resources and change dialog attributes on the fly so that:
  - we can switch between LTR & RTL
  - change the font for Windows XP
* Note that the base RC font has been changed to "Segoe UI Symbols"
  so that it looks the same in the editor (at least for English) but
  can accommodate the length required for "MS Shell Dlg"
This commit is contained in:
Pete Batard 2015-07-03 23:42:45 +01:00
parent 91e699d38a
commit 485b016f17
7 changed files with 126 additions and 438 deletions

View file

@ -563,3 +563,13 @@ void toggle_default_locale(void)
old_msg_table = NULL;
}
}
const char* get_name_from_id(int id)
{
int i;
for (i=0; i<ARRAYSIZE(control_id); i++) {
if (control_id[i].id == id)
return control_id[i].name;
}
return "UNKNOWN ID";
}

View file

@ -173,3 +173,4 @@ void free_locale_list(void);
loc_cmd* get_locale_from_lcid(int lcid, BOOL fallback);
loc_cmd* get_locale_from_name(char* locale_name, BOOL fallback);
void toggle_default_locale(void);
const char* get_name_from_id(int id);

View file

@ -1971,7 +1971,7 @@ void SetBoot(int fs, int tt)
*/
static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
static DWORD DeviceNum = 0, LastRefresh = 0, MessagePos;
static DWORD DeviceNum = 0, LastRefresh = 0;
static BOOL first_log_display = TRUE, user_changed_label = FALSE, isMarquee = FALSE;
static ULONG ulRegister = 0;
static LPITEMIDLIST pidlDesktop = NULL;
@ -2035,7 +2035,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
// Create the log window (hidden)
first_log_display = TRUE;
log_displayed = FALSE;
hLogDlg = CreateDialogW(hMainInstance, MAKEINTRESOURCEW(IDD_LOG + IDD_OFFSET), hDlg, (DLGPROC)LogProc);
hLogDlg = MyCreateDialog(hMainInstance, IDD_LOG, hDlg, (DLGPROC)LogProc);
InitDialog(hDlg);
GetUSBDevices(0);
CheckForUpdates(FALSE);
@ -2622,6 +2622,7 @@ static HANDLE SetHogger(BOOL attached_console, BOOL disable_hogger)
return hogmutex;
}
/*
* Application Entrypoint
*/
@ -2633,18 +2634,18 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
{
const char* rufus_loc = "rufus.loc";
int i, opt, option_index = 0, argc = 0, si = 0, lcid = GetUserDefaultUILanguage();
int wait_for_mutex = 0;
FILE* fd;
BOOL attached_console = FALSE, external_loc_file = FALSE, lgp_set = FALSE, automount, disable_hogger = FALSE;
BYTE *loc_data;
DWORD loc_size, Size;
DWORD loc_size, size;
char tmp_path[MAX_PATH] = "", loc_file[MAX_PATH] = "", ini_path[MAX_PATH], ini_flags[] = "rb";
char *tmp, *locale_name = NULL, **argv = NULL;
wchar_t **wenv, **wargv;
PF_TYPE_DECL(CDECL, int, __wgetmainargs, (int*, wchar_t***, wchar_t***, int, int*));
PF_TYPE_DECL(CDECL, int, __wgetmainargs, (int*, wchar_t***, wchar_t***, int, int*));
HANDLE mutex = NULL, hogmutex = NULL, hFile = NULL;
HWND hDlg = NULL;
MSG msg;
int wait_for_mutex = 0;
struct option long_options[] = {
{"fixed", no_argument, NULL, 'f'},
{"gui", no_argument, NULL, 'g'},
@ -2775,7 +2776,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
hFile = CreateFileU(loc_file, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE,
NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if ((hFile == INVALID_HANDLE_VALUE) || (!WriteFile(hFile, loc_data, loc_size, &Size, 0)) || (loc_size != Size)) {
if ((hFile == INVALID_HANDLE_VALUE) || (!WriteFile(hFile, loc_data, loc_size, &size, 0)) || (loc_size != size)) {
uprintf("localization: unable to extract '%s': %s.\n", loc_file, WindowsErrorString());
safe_closehandle(hFile);
goto out;
@ -2854,22 +2855,8 @@ relaunch:
/*
* Create the main Window
*
* Oh yeah, thanks to Microsoft limitations for dialog boxes this is SUPER SUCKY:
* As per the MSDN [http://msdn.microsoft.com/en-ie/goglobal/bb688119.aspx], "The only way
* to switch between mirrored and nonmirrored dialog resources at run time is to have two
* sets of dialog resources: one mirrored and one nonmirrored."
* Unfortunately, this limitation is VERY REAL, so that's what we have to go through, and
* furthermore, trying to switch part of the dialogs back to LTR is also a major exercise
* in frustration, because it's next to impossible to figure out which combination of
* WS_EX_RTLREADING, WS_EX_RIGHT, WS_EX_LAYOUTRTL, WS_EX_LEFTSCROLLBAR and ES_RIGHT will
* work... and there's no way to toggle ES_RIGHT at runtime anyway.
* So, just like Microsoft advocates, we go through a massive duplication of all our RC
* dialogs (our RTL dialogs having their IDD's offset by +100 - see IDD_OFFSET), just to
* add a handful of stupid flags. And of course, we also have to go through a whole other
* exercise just so that our RTL and non RTL duplicated dialogs are kept in sync...
*/
hDlg = CreateDialogW(hInstance, MAKEINTRESOURCEW(IDD_DIALOG + IDD_OFFSET), NULL, MainCallback);
hDlg = MyCreateDialog(hInstance, IDD_DIALOG, NULL, MainCallback);
if (hDlg == NULL) {
MessageBoxU(NULL, "Could not create Window", "DialogBox failure", MB_ICONSTOP|MB_IS_RTL|MB_SYSTEMMODAL);
goto out;

View file

@ -82,7 +82,6 @@
#endif
#define IsChecked(CheckBox_ID) (IsDlgButtonChecked(hMainDialog, CheckBox_ID) == BST_CHECKED)
#define MB_IS_RTL (right_to_left_mode?MB_RTLREADING:0)
#define IDD_OFFSET ((right_to_left_mode?100:0) + ((nWindowsVersion <= WINDOWS_XP)?50:0))
#define CHECK_FOR_USER_CANCEL if (IS_ERROR(FormatStatus)) goto out
#define safe_free(p) do {free((void*)p); p = NULL;} while(0)
@ -382,7 +381,6 @@ extern int dialog_showing;
*/
extern void GetWindowsVersion(void);
extern BOOL is_x64(void);
//extern const char* PrintWindowsVersion(enum WindowsVersion version);
extern const char *WindowsErrorString(void);
extern void DumpBufferHex(void *buf, size_t size);
extern void PrintStatusInfo(BOOL info, BOOL debug, unsigned int duration, int msg_id, ...);
@ -394,6 +392,8 @@ extern void UpdateProgress(int op, float percent);
extern const char* StrError(DWORD error_code, BOOL use_default_locale);
extern char* GuidToString(const GUID* guid);
extern char* SizeToHumanReadable(uint64_t size, BOOL copy_to_log, BOOL fake_units);
extern HWND MyCreateDialog(HINSTANCE hInstance, int Dialog_ID, HWND hWndParent, DLGPROC lpDialogFunc);
extern INT_PTR MyDialogBox(HINSTANCE hInstance, int Dialog_ID, HWND hWndParent, DLGPROC lpDialogFunc);
extern void CenterDialog(HWND hDlg);
extern void ResizeMoveCtrl(HWND hDlg, HWND hCtrl, int dx, int dy, int dw, int dh);
extern void CreateStatusBar(void);
@ -569,5 +569,6 @@ static __inline HMODULE GetLibraryHandle(char* szLibraryName) {
/* Why oh why does Microsoft have to make everybody suffer with their braindead use of Unicode? */
#define _RT_ICON MAKEINTRESOURCEA(3)
#define _RT_DIALOG MAKEINTRESOURCEA(5)
#define _RT_RCDATA MAKEINTRESOURCEA(10)
#define _RT_GROUP_ICON MAKEINTRESOURCEA((ULONG_PTR)(MAKEINTRESOURCEA(3) + 11))

View file

@ -32,8 +32,8 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 242, 376
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Rufus 2.3.689"
FONT 8, "Segoe UI", 400, 0, 0x1
CAPTION "Rufus 2.3.690"
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
COMBOBOX IDC_DEVICE,8,17,226,33,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
@ -76,11 +76,11 @@ END
IDD_ABOUTBOX DIALOGEX 0, 0, 319, 237
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About Rufus"
FONT 8, "Segoe UI", 400, 0, 0x0
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
ICON IDI_ICON,IDC_ABOUT_ICON,11,8,20,20
CONTROL "",IDC_ABOUT_BLURB,"RichEdit20W",0x884,45,7,268,107
CONTROL "",IDC_ABOUT_COPYRIGHTS,"RichEdit20W",WS_VSCROLL | WS_TABSTOP | 0x804,46,115,267,91,WS_EX_STATICEDGE
CONTROL "",IDC_ABOUT_BLURB,"RichEdit20W",ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY,45,7,268,107
CONTROL "",IDC_ABOUT_COPYRIGHTS,"RichEdit20W",ES_MULTILINE | ES_READONLY | WS_VSCROLL | WS_TABSTOP,46,115,267,91,WS_EX_STATICEDGE
PUSHBUTTON "License",IDC_ABOUT_LICENSE,46,215,50,14,WS_GROUP
PUSHBUTTON "Updates",IDC_ABOUT_UPDATES,100,215,50,14,NOT WS_VISIBLE | WS_GROUP
DEFPUSHBUTTON "OK",IDOK,251,215,50,14,WS_GROUP
@ -89,7 +89,7 @@ END
IDD_LICENSE DIALOGEX 0, 0, 335, 205
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Rufus License"
FONT 8, "Segoe UI", 400, 0, 0x1
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
DEFPUSHBUTTON "Close",IDCANCEL,278,187,50,14
EDITTEXT IDC_LICENSE_TEXT,7,7,321,176,ES_MULTILINE | ES_READONLY | WS_VSCROLL
@ -98,7 +98,7 @@ END
IDD_LOG DIALOGEX 0, 0, 366, 376
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION
CAPTION "Log"
FONT 8, "Segoe UI", 400, 0, 0x1
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
EDITTEXT IDC_LOG_EDIT,0,0,366,346,ES_MULTILINE | ES_READONLY | NOT WS_BORDER | WS_VSCROLL,WS_EX_CLIENTEDGE
PUSHBUTTON "Clear Log",IDC_LOG_CLEAR,198,354,50,14
@ -109,7 +109,7 @@ END
IDD_NOTIFICATION DIALOGEX 0, 0, 263, 63
STYLE DS_SETFONT | DS_NOFAILCREATE | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_THICKFRAME
CAPTION "Rufus"
FONT 8, "Segoe UI", 400, 0, 0x1
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "",IDC_NOTIFICATION_LINE,0,0,263,39
CONTROL "",IDC_STATIC,"Static",SS_WHITERECT,0,0,263,38
@ -123,11 +123,11 @@ END
IDD_UPDATE_POLICY DIALOGEX 0, 0, 287, 198
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Update policy and settings"
FONT 8, "Segoe UI", 400, 0, 0x0
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
ICON IDI_ICON,IDC_ABOUT_ICON,11,8,20,20
DEFPUSHBUTTON "Close",IDCANCEL,221,172,50,14,WS_GROUP
CONTROL "",IDC_POLICY,"RichEdit20W",WS_VSCROLL | WS_TABSTOP | 0x804,46,8,235,130,WS_EX_STATICEDGE
CONTROL "",IDC_POLICY,"RichEdit20W",ES_MULTILINE | ES_READONLY | WS_VSCROLL | WS_TABSTOP,46,8,235,130,WS_EX_STATICEDGE
GROUPBOX "Settings",IDS_UPDATE_SETTINGS_GRP,45,145,165,46
LTEXT "Check for updates",IDS_UPDATE_FREQUENCY_TXT,51,159,76,11
COMBOBOX IDC_UPDATE_FREQUENCY,133,155,66,12,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
@ -140,399 +140,10 @@ END
IDD_NEW_VERSION DIALOGEX 0, 0, 384, 268
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Check For Updates - Rufus"
FONT 8, "Segoe UI", 400, 0, 0x0
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
PUSHBUTTON "Close",IDCANCEL,167,244,50,14,WS_GROUP
CONTROL "",IDC_RELEASE_NOTES,"RichEdit20W",WS_VSCROLL | 0x804,15,77,352,88,WS_EX_STATICEDGE
DEFPUSHBUTTON "Download",IDC_DOWNLOAD,293,211,74,14,WS_GROUP
CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER,15,212,270,11
GROUPBOX "Release Notes",IDS_NEW_VERSION_NOTES_GRP,8,63,367,111
LTEXT "A newer version is available. Please download the latest version!",IDS_NEW_VERSION_AVAIL_TXT,10,32,366,8
LTEXT "[...]",IDC_YOUR_VERSION,10,8,366,8
LTEXT "[...]",IDC_LATEST_VERSION,10,19,366,8
CTEXT "Click here to go to the website",IDC_WEBSITE,10,49,366,9,SS_NOTIFY
GROUPBOX "Download",IDS_NEW_VERSION_DOWNLOAD_GRP,8,177,367,58
EDITTEXT IDC_DOWNLOAD_URL,15,191,351,13,ES_AUTOHSCROLL | ES_READONLY
END
IDD_DIALOG_XP DIALOGEX 12, 12, 242, 376
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Rufus 2.3.689"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
COMBOBOX IDC_DEVICE,8,17,226,33,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Partition scheme and target system type",IDS_PARTITION_TYPE_TXT,9,35,222,8
COMBOBOX IDC_PARTITION_TYPE,8,46,226,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "File system",IDS_FILESYSTEM_TXT,9,64,222,10
COMBOBOX IDC_FILESYSTEM,8,75,226,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Cluster size",IDS_CLUSTERSIZE_TXT,9,93,222,10
COMBOBOX IDC_CLUSTERSIZE,8,104,226,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "New volume label",IDS_LABEL_TXT,9,121,222,10
EDITTEXT IDC_LABEL,8,131,226,12,ES_AUTOHSCROLL
GROUPBOX "Format Options",IDS_FORMAT_OPTIONS_GRP,7,149,227,89
PUSHBUTTON "",IDC_ADVANCED,220,148,14,10,BS_ICON
CONTROL "Check device for bad blocks",IDC_BADBLOCKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,161,112,10
COMBOBOX IDC_NBPASSES,128,159,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Quick format",IDC_QUICKFORMAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,173,121,10
CONTROL "Create a bootable disk using",IDC_BOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,185,112,10
COMBOBOX IDC_BOOTTYPE,128,184,75,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "",IDC_SELECT_ISO,207,183,21,14,BS_ICON
CONTROL "Standard Windows installation",IDC_WINDOWS_INSTALL,
"Button",BS_AUTORADIOBUTTON | WS_GROUP,23,198,205,8
CONTROL "Windows To Go",IDC_WINDOWS_TO_GO,"Button",BS_AUTORADIOBUTTON,23,210,205,8
CONTROL "Create extended label and icon files",IDC_SET_ICON,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,221,216,10
GROUPBOX "Advanced Options",IDS_ADVANCED_OPTIONS_GRP,7,234,227,55
CONTROL "List USB Hard Drives",IDC_ENABLE_FIXED_DISKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,247,216,10
CONTROL "Add fixes for old BIOSes (extra partition, align, etc.)",IDC_EXTRA_PARTITION,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,259,216,10
CONTROL "Use Rufus MBR with BIOS ID",IDC_RUFUS_MBR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,272,112,10
COMBOBOX IDC_DISK_ID,128,270,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "",IDC_PROGRESS,"msctls_progress32",PBS_SMOOTH | WS_BORDER,8,298,225,9
EDITTEXT IDC_INFO,8,316,225,12,ES_CENTER | ES_READONLY | NOT WS_BORDER,WS_EX_STATICEDGE
PUSHBUTTON "About...",IDC_ABOUT,8,339,50,14
PUSHBUTTON "Log",IDC_LOG,63,339,21,14
PUSHBUTTON "T",IDC_TEST,90,339,12,14,NOT WS_VISIBLE
DEFPUSHBUTTON "Start",IDC_START,127,339,50,14
PUSHBUTTON "Close",IDCANCEL,183,339,50,14
END
IDD_ABOUTBOX_XP DIALOGEX 0, 0, 319, 237
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About Rufus"
FONT 8, "MS Shell Dlg", 400, 0, 0x0
BEGIN
ICON IDI_ICON,IDC_ABOUT_ICON,11,8,20,20
CONTROL "",IDC_ABOUT_BLURB,"RichEdit20W",0x884,45,7,268,107
CONTROL "",IDC_ABOUT_COPYRIGHTS,"RichEdit20W",WS_VSCROLL | 0x804,46,115,267,91,WS_EX_STATICEDGE
PUSHBUTTON "License",IDC_ABOUT_LICENSE,46,215,50,14,WS_GROUP
PUSHBUTTON "Updates",IDC_ABOUT_UPDATES,100,215,50,14,NOT WS_VISIBLE | WS_GROUP
DEFPUSHBUTTON "OK",IDOK,251,215,50,14,WS_GROUP
END
IDD_LICENSE_XP DIALOGEX 0, 0, 335, 205
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Rufus License"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Close",IDCANCEL,278,187,50,14
EDITTEXT IDC_LICENSE_TEXT,7,7,321,176,ES_MULTILINE | ES_READONLY | WS_VSCROLL
END
IDD_LOG_XP DIALOGEX 0, 0, 366, 376
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION
CAPTION "Log"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
EDITTEXT IDC_LOG_EDIT,0,0,366,346,ES_MULTILINE | ES_READONLY | NOT WS_BORDER | WS_VSCROLL,WS_EX_CLIENTEDGE
PUSHBUTTON "Clear Log",IDC_LOG_CLEAR,198,354,50,14
PUSHBUTTON "Save Log",IDC_LOG_SAVE,253,354,50,14
DEFPUSHBUTTON "Close Log",IDCANCEL,308,354,50,14
END
IDD_NOTIFICATION_XP DIALOGEX 0, 0, 263, 63
STYLE DS_SETFONT | DS_NOFAILCREATE | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_THICKFRAME
CAPTION "Rufus"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
LTEXT "",IDC_NOTIFICATION_LINE,0,0,263,39
CONTROL "",IDC_STATIC,"Static",SS_WHITERECT,0,0,263,38
ICON OCR_UP,IDC_NOTIFICATION_ICON,6,6,20,20
LTEXT "",IDC_NOTIFICATION_TEXT,35,10,219,20
DEFPUSHBUTTON "No",IDNO,206,44,50,14
PUSHBUTTON "More information",IDC_MORE_INFO,8,44,76,14,NOT WS_VISIBLE
PUSHBUTTON "Yes",IDYES,154,44,50,14,NOT WS_VISIBLE
END
IDD_UPDATE_POLICY_XP DIALOGEX 0, 0, 287, 198
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Update policy and settings"
FONT 8, "MS Shell Dlg", 400, 0, 0x0
BEGIN
ICON IDI_ICON,IDC_ABOUT_ICON,11,8,20,20
DEFPUSHBUTTON "Close",IDCANCEL,221,172,50,14,WS_GROUP
CONTROL "",IDC_POLICY,"RichEdit20W",WS_VSCROLL | WS_TABSTOP | 0x804,46,8,235,130,WS_EX_STATICEDGE
GROUPBOX "Settings",IDS_UPDATE_SETTINGS_GRP,45,145,165,46
LTEXT "Check for updates",IDS_UPDATE_FREQUENCY_TXT,51,159,76,11
COMBOBOX IDC_UPDATE_FREQUENCY,133,155,66,12,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Include beta versions",IDS_INCLUDE_BETAS_TXT,51,174,76,11
COMBOBOX IDC_INCLUDE_BETAS,133,172,36,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
GROUPBOX "",IDS_CHECK_NOW_GRP,210,145,71,46
PUSHBUTTON "Check Now",IDC_CHECK_NOW,221,154,50,15
END
IDD_NEW_VERSION_XP DIALOGEX 0, 0, 384, 268
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Check For Updates - Rufus"
FONT 8, "MS Shell Dlg", 400, 0, 0x0
BEGIN
PUSHBUTTON "Close",IDCANCEL,167,244,50,14,WS_GROUP
CONTROL "",IDC_RELEASE_NOTES,"RichEdit20W",WS_VSCROLL | 0x804,15,77,352,88,WS_EX_STATICEDGE
DEFPUSHBUTTON "Download",IDC_DOWNLOAD,293,211,74,14,WS_GROUP
CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER,15,212,270,11
GROUPBOX "Release Notes",IDS_NEW_VERSION_NOTES_GRP,8,63,367,111
LTEXT "A newer version is available. Please download the latest version!",IDS_NEW_VERSION_AVAIL_TXT,10,32,366,8
LTEXT "[...]",IDC_YOUR_VERSION,10,8,366,8
LTEXT "[...]",IDC_LATEST_VERSION,10,19,366,8
CTEXT "Click here to go to the website",IDC_WEBSITE,10,49,366,9,SS_NOTIFY
GROUPBOX "Download",IDS_NEW_VERSION_DOWNLOAD_GRP,8,177,367,58
EDITTEXT IDC_DOWNLOAD_URL,15,191,351,13,ES_AUTOHSCROLL | ES_READONLY
END
IDD_DIALOG_RTL DIALOGEX 12, 12, 242, 376
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Rufus 2.3.689"
FONT 8, "Segoe UI", 400, 0, 0x1
BEGIN
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
COMBOBOX IDC_DEVICE,8,17,226,33,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Partition scheme and target system type",IDS_PARTITION_TYPE_TXT,9,35,222,8
COMBOBOX IDC_PARTITION_TYPE,8,46,226,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "File system",IDS_FILESYSTEM_TXT,9,64,222,10
COMBOBOX IDC_FILESYSTEM,8,75,226,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Cluster size",IDS_CLUSTERSIZE_TXT,9,93,222,10
COMBOBOX IDC_CLUSTERSIZE,8,104,226,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "New volume label",IDS_LABEL_TXT,9,121,222,10
EDITTEXT IDC_LABEL,8,131,226,12,ES_AUTOHSCROLL
GROUPBOX "Format Options",IDS_FORMAT_OPTIONS_GRP,7,149,227,89
PUSHBUTTON "",IDC_ADVANCED,220,148,14,10,BS_ICON
CONTROL "Check device for bad blocks",IDC_BADBLOCKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,161,112,10
COMBOBOX IDC_NBPASSES,128,159,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Quick format",IDC_QUICKFORMAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,173,121,10
CONTROL "Create a bootable disk using",IDC_BOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,185,112,10
COMBOBOX IDC_BOOTTYPE,128,184,75,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "",IDC_SELECT_ISO,207,183,21,14,BS_ICON
CONTROL "Standard Windows installation",IDC_WINDOWS_INSTALL,
"Button",BS_AUTORADIOBUTTON | WS_GROUP,23,198,205,8
CONTROL "Windows To Go",IDC_WINDOWS_TO_GO,"Button",BS_AUTORADIOBUTTON,23,210,205,8
CONTROL "Create extended label and icon files",IDC_SET_ICON,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,221,216,10
GROUPBOX "Advanced Options",IDS_ADVANCED_OPTIONS_GRP,7,234,227,55
CONTROL "List USB Hard Drives",IDC_ENABLE_FIXED_DISKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,247,216,10
CONTROL "Add fixes for old BIOSes (extra partition, align, etc.)",IDC_EXTRA_PARTITION,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,259,216,10
CONTROL "Use Rufus MBR with BIOS ID",IDC_RUFUS_MBR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,272,112,10
COMBOBOX IDC_DISK_ID,128,270,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "",IDC_PROGRESS,"msctls_progress32",PBS_SMOOTH | WS_BORDER,8,298,225,9
EDITTEXT IDC_INFO,8,316,225,12,ES_CENTER | ES_READONLY | NOT WS_BORDER,WS_EX_STATICEDGE
PUSHBUTTON "About...",IDC_ABOUT,8,339,50,14
PUSHBUTTON "Log",IDC_LOG,63,339,21,14
PUSHBUTTON "T",IDC_TEST,90,339,12,14,NOT WS_VISIBLE
DEFPUSHBUTTON "Start",IDC_START,127,339,50,14
PUSHBUTTON "Close",IDCANCEL,183,339,50,14
END
IDD_ABOUTBOX_RTL DIALOGEX 0, 0, 319, 237
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "About Rufus"
FONT 8, "Segoe UI", 400, 0, 0x0
BEGIN
ICON IDI_ICON,IDC_ABOUT_ICON,11,8,20,20
CONTROL "",IDC_ABOUT_BLURB,"RichEdit20W",0x884,45,7,268,107
CONTROL "",IDC_ABOUT_COPYRIGHTS,"RichEdit20W",WS_VSCROLL | 0x804,46,115,267,91,WS_EX_STATICEDGE
PUSHBUTTON "License",IDC_ABOUT_LICENSE,46,215,50,14,WS_GROUP
PUSHBUTTON "Updates",IDC_ABOUT_UPDATES,100,215,50,14,NOT WS_VISIBLE | WS_GROUP
DEFPUSHBUTTON "OK",IDOK,251,215,50,14,WS_GROUP
END
IDD_LICENSE_RTL DIALOGEX 0, 0, 335, 205
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Rufus License"
FONT 8, "Segoe UI", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Close",IDCANCEL,278,187,50,14
EDITTEXT IDC_LICENSE_TEXT,7,7,321,176,ES_RIGHT | ES_MULTILINE | ES_READONLY | WS_VSCROLL,WS_EX_RIGHT | WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR
END
IDD_LOG_RTL DIALOGEX 0, 0, 366, 376
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION
EXSTYLE WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Log"
FONT 8, "Segoe UI", 400, 0, 0x1
BEGIN
EDITTEXT IDC_LOG_EDIT,0,0,366,346,ES_MULTILINE | ES_READONLY | NOT WS_BORDER | WS_VSCROLL,WS_EX_CLIENTEDGE
PUSHBUTTON "Clear Log",IDC_LOG_CLEAR,198,354,50,14
PUSHBUTTON "Save Log",IDC_LOG_SAVE,253,354,50,14
DEFPUSHBUTTON "Close Log",IDCANCEL,308,354,50,14
END
IDD_NOTIFICATION_RTL DIALOGEX 0, 0, 263, 63
STYLE DS_SETFONT | DS_NOFAILCREATE | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_THICKFRAME
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Rufus"
FONT 8, "Segoe UI", 400, 0, 0x1
BEGIN
LTEXT "",IDC_NOTIFICATION_LINE,0,0,263,39
CONTROL "",IDC_STATIC,"Static",SS_WHITERECT,0,0,263,38
ICON OCR_UP,IDC_NOTIFICATION_ICON,6,6,20,20
LTEXT "",IDC_NOTIFICATION_TEXT,35,10,219,20
DEFPUSHBUTTON "No",IDNO,206,44,50,14
PUSHBUTTON "More information",IDC_MORE_INFO,8,44,76,14,NOT WS_VISIBLE
PUSHBUTTON "Yes",IDYES,154,44,50,14,NOT WS_VISIBLE
END
IDD_UPDATE_POLICY_RTL DIALOGEX 0, 0, 287, 198
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Update policy and settings"
FONT 8, "Segoe UI", 400, 0, 0x0
BEGIN
ICON IDI_ICON,IDC_ABOUT_ICON,11,8,20,20
DEFPUSHBUTTON "Close",IDCANCEL,221,172,50,14,WS_GROUP
CONTROL "",IDC_POLICY,"RichEdit20W",WS_VSCROLL | WS_TABSTOP | 0x804,46,8,235,130,WS_EX_STATICEDGE
GROUPBOX "Settings",IDS_UPDATE_SETTINGS_GRP,45,145,165,46
LTEXT "Check for updates",IDS_UPDATE_FREQUENCY_TXT,51,159,76,11
COMBOBOX IDC_UPDATE_FREQUENCY,133,155,66,12,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Include beta versions",IDS_INCLUDE_BETAS_TXT,51,174,76,11
COMBOBOX IDC_INCLUDE_BETAS,133,172,36,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
GROUPBOX "",IDS_CHECK_NOW_GRP,210,145,71,46
PUSHBUTTON "Check Now",IDC_CHECK_NOW,221,154,50,15
END
IDD_NEW_VERSION_RTL DIALOGEX 0, 0, 384, 268
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Check For Updates - Rufus"
FONT 8, "Segoe UI", 400, 0, 0x0
BEGIN
PUSHBUTTON "Close",IDCANCEL,167,244,50,14,WS_GROUP
CONTROL "",IDC_RELEASE_NOTES,"RichEdit20W",WS_VSCROLL | 0x804,15,77,352,88,WS_EX_STATICEDGE
DEFPUSHBUTTON "Download",IDC_DOWNLOAD,293,211,74,14,WS_GROUP
CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER,15,212,270,11
GROUPBOX "Release Notes",IDS_NEW_VERSION_NOTES_GRP,8,63,367,111
LTEXT "A newer version is available. Please download the latest version!",IDS_NEW_VERSION_AVAIL_TXT,10,32,366,8
LTEXT "[...]",IDC_YOUR_VERSION,10,8,366,8
LTEXT "[...]",IDC_LATEST_VERSION,10,19,366,8
CTEXT "Click here to go to the website",IDC_WEBSITE,10,49,366,9,SS_NOTIFY
GROUPBOX "Download",IDS_NEW_VERSION_DOWNLOAD_GRP,8,177,367,58
EDITTEXT IDC_DOWNLOAD_URL,15,191,351,13,ES_AUTOHSCROLL | ES_READONLY
END
IDD_DIALOG_RTL_XP DIALOGEX 12, 12, 242, 376
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Rufus 2.3.689"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
COMBOBOX IDC_DEVICE,8,17,226,33,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Partition scheme and target system type",IDS_PARTITION_TYPE_TXT,9,35,222,8
COMBOBOX IDC_PARTITION_TYPE,8,46,226,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "File system",IDS_FILESYSTEM_TXT,9,64,222,10
COMBOBOX IDC_FILESYSTEM,8,75,226,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Cluster size",IDS_CLUSTERSIZE_TXT,9,93,222,10
COMBOBOX IDC_CLUSTERSIZE,8,104,226,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "New volume label",IDS_LABEL_TXT,9,121,222,10
EDITTEXT IDC_LABEL,8,131,226,12,ES_AUTOHSCROLL
GROUPBOX "Format Options",IDS_FORMAT_OPTIONS_GRP,7,149,227,89
PUSHBUTTON "",IDC_ADVANCED,220,148,14,10,BS_ICON
CONTROL "Check device for bad blocks",IDC_BADBLOCKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,161,112,10
COMBOBOX IDC_NBPASSES,128,159,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Quick format",IDC_QUICKFORMAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,173,121,10
CONTROL "Create a bootable disk using",IDC_BOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,185,112,10
COMBOBOX IDC_BOOTTYPE,128,184,75,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "",IDC_SELECT_ISO,207,183,21,14,BS_ICON
CONTROL "Standard Windows installation",IDC_WINDOWS_INSTALL,
"Button",BS_AUTORADIOBUTTON | WS_GROUP,23,198,205,8
CONTROL "Windows To Go",IDC_WINDOWS_TO_GO,"Button",BS_AUTORADIOBUTTON,23,210,205,8
CONTROL "Create extended label and icon files",IDC_SET_ICON,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,221,216,10
GROUPBOX "Advanced Options",IDS_ADVANCED_OPTIONS_GRP,7,234,227,55
CONTROL "List USB Hard Drives",IDC_ENABLE_FIXED_DISKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,247,216,10
CONTROL "Add fixes for old BIOSes (extra partition, align, etc.)",IDC_EXTRA_PARTITION,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,259,216,10
CONTROL "Use Rufus MBR with BIOS ID",IDC_RUFUS_MBR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,272,112,10
COMBOBOX IDC_DISK_ID,128,270,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "",IDC_PROGRESS,"msctls_progress32",PBS_SMOOTH | WS_BORDER,8,298,225,9
EDITTEXT IDC_INFO,8,316,225,12,ES_CENTER | ES_READONLY | NOT WS_BORDER,WS_EX_STATICEDGE
PUSHBUTTON "About...",IDC_ABOUT,8,339,50,14
PUSHBUTTON "Log",IDC_LOG,63,339,21,14
PUSHBUTTON "T",IDC_TEST,90,339,12,14,NOT WS_VISIBLE
DEFPUSHBUTTON "Start",IDC_START,127,339,50,14
PUSHBUTTON "Close",IDCANCEL,183,339,50,14
END
IDD_ABOUTBOX_RTL_XP DIALOGEX 0, 0, 319, 237
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "About Rufus"
FONT 8, "MS Shell Dlg", 400, 0, 0x0
BEGIN
ICON IDI_ICON,IDC_ABOUT_ICON,11,8,20,20
CONTROL "",IDC_ABOUT_BLURB,"RichEdit20W",0x884,45,7,268,107
CONTROL "",IDC_ABOUT_COPYRIGHTS,"RichEdit20W",WS_VSCROLL | 0x804,46,115,267,91,WS_EX_STATICEDGE
PUSHBUTTON "License",IDC_ABOUT_LICENSE,46,215,50,14,WS_GROUP
PUSHBUTTON "Updates",IDC_ABOUT_UPDATES,100,215,50,14,NOT WS_VISIBLE | WS_GROUP
DEFPUSHBUTTON "OK",IDOK,251,215,50,14,WS_GROUP
END
IDD_LICENSE_RTL_XP DIALOGEX 0, 0, 335, 205
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Rufus License"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Close",IDCANCEL,278,187,50,14
EDITTEXT IDC_LICENSE_TEXT,7,7,321,176,ES_RIGHT | ES_MULTILINE | ES_READONLY | WS_VSCROLL,WS_EX_RIGHT | WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR
END
IDD_LOG_RTL_XP DIALOGEX 0, 0, 366, 376
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION
EXSTYLE WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Log"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
EDITTEXT IDC_LOG_EDIT,0,0,366,346,ES_MULTILINE | ES_READONLY | NOT WS_BORDER | WS_VSCROLL,WS_EX_CLIENTEDGE
PUSHBUTTON "Clear Log",IDC_LOG_CLEAR,198,354,50,14
PUSHBUTTON "Save Log",IDC_LOG_SAVE,253,354,50,14
DEFPUSHBUTTON "Close Log",IDCANCEL,308,354,50,14
END
IDD_NOTIFICATION_RTL_XP DIALOGEX 0, 0, 263, 63
STYLE DS_SETFONT | DS_NOFAILCREATE | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_THICKFRAME
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Rufus"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
LTEXT "",IDC_NOTIFICATION_LINE,0,0,263,39
CONTROL "",IDC_STATIC,"Static",SS_WHITERECT,0,0,263,38
ICON OCR_UP,IDC_NOTIFICATION_ICON,6,6,20,20
LTEXT "",IDC_NOTIFICATION_TEXT,35,10,219,20
DEFPUSHBUTTON "No",IDNO,206,44,50,14
PUSHBUTTON "More information",IDC_MORE_INFO,8,44,76,14,NOT WS_VISIBLE
PUSHBUTTON "Yes",IDYES,154,44,50,14,NOT WS_VISIBLE
END
IDD_UPDATE_POLICY_RTL_XP DIALOGEX 0, 0, 287, 198
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Update policy and settings"
FONT 8, "MS Shell Dlg", 400, 0, 0x0
BEGIN
ICON IDI_ICON,IDC_ABOUT_ICON,11,8,20,20
DEFPUSHBUTTON "Close",IDCANCEL,221,172,50,14,WS_GROUP
CONTROL "",IDC_POLICY,"RichEdit20W",WS_VSCROLL | 0x804,46,8,235,130,WS_EX_STATICEDGE
GROUPBOX "Settings",IDS_UPDATE_SETTINGS_GRP,45,145,165,46
LTEXT "Check for updates",IDS_UPDATE_FREQUENCY_TXT,51,159,76,11
COMBOBOX IDC_UPDATE_FREQUENCY,133,155,66,12,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Include beta versions",IDS_INCLUDE_BETAS_TXT,51,174,76,11
COMBOBOX IDC_INCLUDE_BETAS,133,172,36,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
GROUPBOX "",IDS_CHECK_NOW_GRP,210,145,71,46
PUSHBUTTON "Check Now",IDC_CHECK_NOW,221,154,50,15
END
IDD_NEW_VERSION_RTL_XP DIALOGEX 0, 0, 384, 268
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Check For Updates - Rufus"
FONT 8, "MS Shell Dlg", 400, 0, 0x0
BEGIN
PUSHBUTTON "Close",IDCANCEL,167,244,50,14,WS_GROUP
CONTROL "",IDC_RELEASE_NOTES,"RichEdit20W",WS_VSCROLL | 0x804,15,77,352,88,WS_EX_STATICEDGE
CONTROL "",IDC_RELEASE_NOTES,"RichEdit20W",ES_MULTILINE | ES_READONLY | WS_VSCROLL,15,77,352,88,WS_EX_STATICEDGE
DEFPUSHBUTTON "Download",IDC_DOWNLOAD,293,211,74,14,WS_GROUP
CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER,15,212,270,11
GROUPBOX "Release Notes",IDS_NEW_VERSION_NOTES_GRP,8,63,367,111
@ -671,8 +282,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,3,689,0
PRODUCTVERSION 2,3,689,0
FILEVERSION 2,3,690,0
PRODUCTVERSION 2,3,690,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -689,13 +300,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "2.3.689"
VALUE "FileVersion", "2.3.690"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2015 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "2.3.689"
VALUE "ProductVersion", "2.3.690"
END
END
BLOCK "VarFileInfo"

View file

@ -501,12 +501,12 @@ unsigned char* GetResource(HMODULE module, char* name, char* type, const char* d
res = FindResourceA(module, name, type);
if (res == NULL) {
uprintf("Unable to locate resource '%s': %s\n", desc, WindowsErrorString());
uprintf("Could not locate resource '%s': %s\n", desc, WindowsErrorString());
goto out;
}
res_handle = LoadResource(module, res);
if (res_handle == NULL) {
uprintf("Unable to load resource '%s': %s\n", desc, WindowsErrorString());
uprintf("Could not load resource '%s': %s\n", desc, WindowsErrorString());
goto out;
}
*len = SizeofResource(module, res);
@ -514,7 +514,7 @@ unsigned char* GetResource(HMODULE module, char* name, char* type, const char* d
if (duplicate) {
p = (unsigned char*)malloc(*len);
if (p == NULL) {
uprintf("Unable to allocate resource '%s'\n", desc);
uprintf("Coult not allocate resource '%s'\n", desc);
goto out;
}
memcpy(p, LockResource(res_handle), *len);

View file

@ -609,10 +609,10 @@ INT_PTR CALLBACK AboutCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lP
EndDialog(hDlg, LOWORD(wParam));
return (INT_PTR)TRUE;
case IDC_ABOUT_LICENSE:
DialogBoxW(hMainInstance, MAKEINTRESOURCEW(IDD_LICENSE + IDD_OFFSET), hDlg, LicenseCallback);
MyDialogBox(hMainInstance, IDD_LICENSE, hDlg, LicenseCallback);
break;
case IDC_ABOUT_UPDATES:
DialogBoxW(hMainInstance, MAKEINTRESOURCEW(IDD_UPDATE_POLICY + IDD_OFFSET), hDlg, UpdateCallback);
MyDialogBox(hMainInstance, IDD_UPDATE_POLICY, hDlg, UpdateCallback);
break;
}
break;
@ -624,7 +624,7 @@ INT_PTR CreateAboutBox(void)
{
INT_PTR r;
dialog_showing++;
r = DialogBoxW(hMainInstance, MAKEINTRESOURCEW(IDD_ABOUTBOX + IDD_OFFSET), hMainDialog, AboutCallback);
r = MyDialogBox(hMainInstance, IDD_ABOUTBOX, hMainDialog, AboutCallback);
dialog_showing--;
return r;
}
@ -719,8 +719,7 @@ INT_PTR CALLBACK NotificationCallback(HWND hDlg, UINT message, WPARAM wParam, LP
return (INT_PTR)TRUE;
case IDC_MORE_INFO:
if (notification_more_info != NULL)
DialogBoxW(hMainInstance, MAKEINTRESOURCEW(notification_more_info->id),
hDlg, notification_more_info->callback);
MyDialogBox(hMainInstance, notification_more_info->id, hDlg, notification_more_info->callback);
break;
}
break;
@ -763,7 +762,7 @@ BOOL Notification(int type, const notification_info* more_info, char* title, cha
hMessageIcon = LoadIcon(NULL, IDI_INFORMATION);
break;
}
ret = (DialogBoxW(hMainInstance, MAKEINTRESOURCEW(IDD_NOTIFICATION + IDD_OFFSET), hMainDialog, NotificationCallback) == IDYES);
ret = (MyDialogBox(hMainInstance, IDD_NOTIFICATION, hMainDialog, NotificationCallback) == IDYES);
safe_free(szMessageText);
dialog_showing--;
return ret;
@ -1350,7 +1349,7 @@ INT_PTR CALLBACK NewVersionCallback(HWND hDlg, UINT message, WPARAM wParam, LPAR
void DownloadNewVersion(void)
{
DialogBoxW(hMainInstance, MAKEINTRESOURCEW(IDD_NEW_VERSION + IDD_OFFSET), hMainDialog, NewVersionCallback);
MyDialogBox(hMainInstance, IDD_NEW_VERSION, hMainDialog, NewVersionCallback);
}
void SetTitleBarIcon(HWND hDlg)
@ -1422,3 +1421,82 @@ out:
ReleaseDC(hCtrl, hDC);
return sz;
}
/*
* The following is used to work around dialog template limitations when switching from LTR to RTL
* or switching the font. This avoids having to multiply similar templates in the RC.
* TODO: Can we use http://stackoverflow.com/questions/6057239/which-font-is-the-default-for-mfc-dialog-controls?
* TODO: We are supposed to use Segoe with font size 9 in Vista or later
*/
// Produce a dialog template from our RC, and update its RTL and Font settings dynamically
// See http://blogs.msdn.com/b/oldnewthing/archive/2004/06/21/163596.aspx as well as
// https://msdn.microsoft.com/en-us/library/windows/desktop/ms645389.aspx for a description
// of the Dialog structure
LPCDLGTEMPLATE GetDialogTemplate(int Dialog_ID)
{
int i;
size_t len;
DWORD size;
DWORD* dwBuf;
WCHAR* wBuf;
LPCDLGTEMPLATE rcTemplate = (LPCDLGTEMPLATE) GetResource(hMainInstance, MAKEINTRESOURCEA(Dialog_ID),
_RT_DIALOG, get_name_from_id(Dialog_ID), &size, TRUE);
if ((size == 0) || (rcTemplate == NULL))
return NULL;
if (right_to_left_mode) {
// Add the RTL styles into our RC copy, so that we don't have to multiply dialog definitions in the RC
dwBuf = (DWORD*)rcTemplate;
dwBuf[2] = WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL;
}
wBuf = (WCHAR*)rcTemplate;
wBuf = &wBuf[14]; // Move to class name
// Skip class name and title
for (i = 0; i<2; i++) {
if (*wBuf == 0xFFFF)
wBuf = &wBuf[2]; // Ordinal
else
wBuf = &wBuf[wcslen(wBuf) + 1]; // String
}
// NB: to change the font size to 9, you can use
// wBuf[0] = 0x0009;
wBuf = &wBuf[3];
// Make sure we are where we want to be and adjust the font
if (wcscmp(L"Segoe UI Symbol", wBuf) == 0) {
uintptr_t src, dst, start = (uintptr_t)rcTemplate;
// We can't simply zero the characters we don't want, as the size of the font
// string determines the next item lookup. So we must memmove the remaining of
// our buffer. Oh, and those items are DWORD aligned.
if (nWindowsVersion <= WINDOWS_XP) {
wcscpy(wBuf, L"MS Shell Dlg");
} else {
wBuf[8] = 0;
}
len = wcslen(wBuf);
wBuf[len + 1] = 0;
dst = (uintptr_t)&wBuf[len + 2];
dst &= ~3;
src = (uintptr_t)&wBuf[17];
src &= ~3;
memmove((void*)dst, (void*)src, size - (src - start));
} else {
uprintf("Could not locate font for %s!", get_name_from_id(Dialog_ID));
}
return rcTemplate;
}
HWND MyCreateDialog(HINSTANCE hInstance, int Dialog_ID, HWND hWndParent, DLGPROC lpDialogFunc)
{
LPCDLGTEMPLATE rcTemplate = GetDialogTemplate(Dialog_ID);
HWND hDlg = CreateDialogIndirect(hInstance, rcTemplate, hWndParent, lpDialogFunc);
safe_free(rcTemplate);
return hDlg;
}
INT_PTR MyDialogBox(HINSTANCE hInstance, int Dialog_ID, HWND hWndParent, DLGPROC lpDialogFunc)
{
LPCDLGTEMPLATE rcTemplate = GetDialogTemplate(Dialog_ID);
INT_PTR ret = DialogBoxIndirect(hMainInstance, rcTemplate, hMainDialog, lpDialogFunc);
safe_free(rcTemplate);
return ret;
}