windows/progresswindow: localization
This commit is contained in:
parent
768f171de9
commit
33622d1829
@ -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 "progresswindow.hpp"
|
||||||
|
#include "../functions.hpp"
|
||||||
#include "../progress.hpp"
|
#include "../progress.hpp"
|
||||||
|
#include "../resources_windows.h"
|
||||||
#include "gui_functions.hpp"
|
#include "gui_functions.hpp"
|
||||||
|
|
||||||
#include <commctrl.h>
|
#include <commctrl.h>
|
||||||
@ -12,15 +17,18 @@ ProgressWindow *ProgressWindow::pw = nullptr;
|
|||||||
|
|
||||||
ProgressWindow::ProgressWindow( HINSTANCE hInstance, HWND parent_window )
|
ProgressWindow::ProgressWindow( HINSTANCE hInstance, HWND parent_window )
|
||||||
: parent( parent_window ) {
|
: parent( parent_window ) {
|
||||||
window = CreateWindowW( L"ProgressWindow", L"Progress",
|
window = CreateWindowW( L"ProgressWindow", _( GUI_WINDOW_PROGRESS ),
|
||||||
WS_OVERLAPPEDWINDOW | WS_VISIBLE, CW_USEDEFAULT,
|
WS_OVERLAPPEDWINDOW | WS_VISIBLE, CW_USEDEFAULT,
|
||||||
CW_USEDEFAULT, window_width, window_height, parent,
|
CW_USEDEFAULT, window_width, window_height, parent,
|
||||||
NULL, hInstance, NULL );
|
NULL, hInstance, NULL );
|
||||||
ShowWindow( window, SW_SHOW );
|
ShowWindow( window, SW_SHOW );
|
||||||
auto hFont = ( HFONT )GetStockObject( DEFAULT_GUI_FONT );
|
auto hFont = ( HFONT )GetStockObject( DEFAULT_GUI_FONT );
|
||||||
EnableWindow( parent, false );
|
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 );
|
ID_PROGRESS_STATIC, window, hFont );
|
||||||
progress_bar = createProgressbar( 5, 20, window_width - 25, 25,
|
progress_bar = createProgressbar( 5, 20, window_width - 25, 25,
|
||||||
ID_PROGRESS_BAR, window, hFont );
|
ID_PROGRESS_BAR, window, hFont );
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include <string>
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
class ProgressWindow {
|
class ProgressWindow {
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user