From c61e0019288a32da5f86c4c3d17038b082aba9c0 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 16 Sep 2016 04:34:39 +0300 Subject: move more strings to resources --- src/main.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 2045ef6..c2ffb21 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,7 @@ #include "error.hpp" #include "os.hpp" #include "process.hpp" +#include "resource.hpp" #include "resource_ids.h" #include "sid.hpp" #include "token.hpp" @@ -108,6 +109,14 @@ BOOL on_init_dialog(HWND wnd, HWND, LPARAM) return TRUE; } +void report_already_elevated(HWND wnd) +{ + MessageBoxW(wnd, + resource::load_string(IDS_ALREADY_ELEVATED).c_str(), + resource::load_string(IDS_ELEVATION_CAPTION).c_str(), + MB_OK); +} + void on_button_elevate_click(HWND wnd) { bool as_admin = false; @@ -124,7 +133,7 @@ void on_button_elevate_click(HWND wnd) if (as_admin) { - MessageBoxW(wnd, L"Already elevated!", L"Elevation", MB_OK); + report_already_elevated(wnd); return; } -- cgit v1.2.3