windows/progresswindow: localization

This commit is contained in:
zvon 2020-04-01 13:55:13 +02:00
parent 768f171de9
commit 33622d1829
2 changed files with 11 additions and 3 deletions

View File

@ -1,5 +1,10 @@
#pragma comment( linker, "\"/manifestdependency:type='win32' \
name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \
processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"" )
#include "progresswindow.hpp"
#include "../functions.hpp"
#include "../progress.hpp"
#include "../resources_windows.h"
#include "gui_functions.hpp"
#include <commctrl.h>
@ -12,15 +17,18 @@ ProgressWindow *ProgressWindow::pw = nullptr;
ProgressWindow::ProgressWindow( HINSTANCE hInstance, HWND parent_window )
: parent( parent_window ) {
window = CreateWindowW( L"ProgressWindow", L"Progress",
window = CreateWindowW( L"ProgressWindow", _( GUI_WINDOW_PROGRESS ),
WS_OVERLAPPEDWINDOW | WS_VISIBLE, CW_USEDEFAULT,
CW_USEDEFAULT, window_width, window_height, parent,
NULL, hInstance, NULL );
ShowWindow( window, SW_SHOW );
auto hFont = ( HFONT )GetStockObject( DEFAULT_GUI_FONT );
EnableWindow( parent, false );
setIcons( hInstance, window );
progress_label = createLabel( L"Progress:", 5, 5, window_width - 25, 15,
std::wstring label = _( GUI_WINDOW_PROGRESS );
label += L":";
progress_label = createLabel( label.c_str(), 5, 5, window_width - 25, 15,
ID_PROGRESS_STATIC, window, hFont );
progress_bar = createProgressbar( 5, 20, window_width - 25, 25,
ID_PROGRESS_BAR, window, hFont );

View File

@ -1,5 +1,5 @@
#include <string>
#include <windows.h>
#include <string>
class ProgressWindow {
public: