tv_rename/windows/databasewindow.hpp
2020-02-25 16:11:25 +01:00

41 lines
995 B
C++

#include <string>
#include <vector>
#include <windows.h>
class DatabaseWindow {
public:
DatabaseWindow(
HINSTANCE hInstance,
std::vector< std::pair< std::wstring, std::wstring > > &languages,
HWND parent_window );
void mainLoop();
static LRESULT CALLBACK messageHandler( HWND hwnd, UINT umsg, WPARAM wParam,
LPARAM lParam );
~DatabaseWindow() {
EnableWindow( parent, true );
SetFocus( parent );
}
private:
void listNotify( LPARAM lParam );
void changed( int indes );
void save();
HWND window;
HWND lang_combo;
HWND list_hwnd;
HWND cancel_button;
HWND ok_button;
HWND save_button;
HWND parent;
HINSTANCE hInst;
int cur_row;
const int window_width{ 350 };
const int window_height{ 370 };
std::vector< int > changed_rows;
const std::vector< std::pair< std::wstring, std::wstring > > &langs;
static DatabaseWindow *dw;
};