diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-09-15 20:51:55 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-09-15 20:51:55 +0300 |
commit | a4f78b1847d1a49d5f69cf2e1d3d739fd6ef1185 (patch) | |
tree | b6687b510ffefa5f2d8c991101e96067b4a29a3d | |
parent | refactoring (diff) | |
download | privilege-check-a4f78b1847d1a49d5f69cf2e1d3d739fd6ef1185.tar.gz privilege-check-a4f78b1847d1a49d5f69cf2e1d3d739fd6ef1185.zip |
update resources
-rw-r--r-- | main.cpp | 15 | ||||
-rw-r--r-- | main.rc | 26 | ||||
-rw-r--r-- | resource_ids.h | 6 |
3 files changed, 23 insertions, 24 deletions
@@ -48,21 +48,21 @@ BOOL on_init_dialog(HWND wnd, HWND, LPARAM) { try { - set_label(wnd, IDC_STATIC_IS_ADMIN, is_user_in_administrators()); + set_label(wnd, IDC_STATIC_ADMINISTRATOR, is_user_in_administrators()); } catch (const Error& e) { - set_label(wnd, IDC_STATIC_IS_ADMIN, L"N/A"); + set_label(wnd, IDC_STATIC_ADMINISTRATOR, L"N/A"); error::report(e); } try { - set_label(wnd, IDC_STATIC_IS_RUN_AS_ADMIN, is_run_as_administrator()); + set_label(wnd, IDC_STATIC_RUN_AS_ADMINISTRATOR, is_run_as_administrator()); } catch (const Error& e) { - set_label(wnd, IDC_STATIC_IS_RUN_AS_ADMIN, L"N/A"); + set_label(wnd, IDC_STATIC_RUN_AS_ADMINISTRATOR, L"N/A"); error::report(e); } @@ -71,14 +71,14 @@ BOOL on_init_dialog(HWND wnd, HWND, LPARAM) try { const auto elevated = is_elevated(); - set_label(wnd, IDC_STATIC_IS_ELEVATED, elevated); + set_label(wnd, IDC_STATIC_ELEVATED, elevated); const auto elevate_button = GetDlgItem(wnd, IDC_BUTTON_ELEVATE); Button_SetElevationRequiredState(elevate_button, !elevated); } catch (const Error& e) { - set_label(wnd, IDC_STATIC_IS_ELEVATED, L"N/A"); + set_label(wnd, IDC_STATIC_ELEVATED, L"N/A"); error::report(e); } @@ -95,7 +95,7 @@ BOOL on_init_dialog(HWND wnd, HWND, LPARAM) } else { - set_label(wnd, IDC_STATIC_IS_ELEVATED, L"N/A"); + set_label(wnd, IDC_STATIC_ELEVATED, L"N/A"); set_label(wnd, IDC_STATIC_INTEGRITY_LEVEL, L"N/A"); } @@ -197,7 +197,6 @@ int APIENTRY wWinMain( error::report(e); return 1; } - break; default: return static_cast<int>(ret); @@ -26,20 +26,20 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // Dialog
//
-IDD_MAINDIALOG DIALOGEX 0, 0, 130, 79
+IDD_MAINDIALOG DIALOGEX 0, 0, 120, 79
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Privilege test"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- LTEXT "Is user an administrator:",IDC_STATIC,7,7,85,12
- RTEXT "",IDC_STATIC_IS_ADMIN,95,7,28,12
- LTEXT "Was run as administrator:",IDC_STATIC,7,19,85,12
- RTEXT "",IDC_STATIC_IS_RUN_AS_ADMIN,95,19,28,12
- LTEXT "Is elevated:",IDC_STATIC,7,31,85,12
- RTEXT "",IDC_STATIC_IS_ELEVATED,95,31,28,12
- LTEXT "Integrity Level:",IDC_STATIC,7,43,85,12
- RTEXT "",IDC_STATIC_INTEGRITY_LEVEL,95,43,28,15
- PUSHBUTTON "Elevate!",IDC_BUTTON_ELEVATE,7,58,116,14
+ LTEXT "Administrator:",IDC_STATIC,7,7,75,12
+ RTEXT "",IDC_STATIC_ADMINISTRATOR,85,7,28,12
+ LTEXT "Run as administrator:",IDC_STATIC,7,19,75,12
+ RTEXT "",IDC_STATIC_RUN_AS_ADMINISTRATOR,85,19,28,12
+ LTEXT "Elevated:",IDC_STATIC,7,31,75,12
+ RTEXT "",IDC_STATIC_ELEVATED,85,31,28,12
+ LTEXT "Integrity level:",IDC_STATIC,7,43,75,12
+ RTEXT "",IDC_STATIC_INTEGRITY_LEVEL,85,43,28,15
+ PUSHBUTTON "Elevate",IDC_BUTTON_ELEVATE,7,58,106,14
END
@@ -54,9 +54,9 @@ BEGIN IDD_MAINDIALOG, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 123
- VERTGUIDE, 92
- VERTGUIDE, 95
+ RIGHTMARGIN, 113
+ VERTGUIDE, 82
+ VERTGUIDE, 85
TOPMARGIN, 7
BOTTOMMARGIN, 72
HORZGUIDE, 19
diff --git a/resource_ids.h b/resource_ids.h index 066c6df..d77ee63 100644 --- a/resource_ids.h +++ b/resource_ids.h @@ -4,9 +4,9 @@ //
#define IDD_MAINDIALOG 100
#define IDC_BUTTON_ELEVATE 1000
-#define IDC_STATIC_IS_ADMIN 1001
-#define IDC_STATIC_IS_RUN_AS_ADMIN 1002
-#define IDC_STATIC_IS_ELEVATED 1003
+#define IDC_STATIC_ADMINISTRATOR 1001
+#define IDC_STATIC_RUN_AS_ADMINISTRATOR 1002
+#define IDC_STATIC_ELEVATED 1003
#define IDC_STATIC_INTEGRITY_LEVEL 1004
#define IDC_STATIC -1
|