tv_rename/windows/patternwindow.hpp

35 lines
792 B
C++
Raw Normal View History

2020-02-25 15:11:25 +00:00
#include <windows.h>
2020-04-01 11:54:19 +00:00
#include <string>
2020-02-25 15:11:25 +00:00
class PatternWindow {
public:
PatternWindow( HINSTANCE hInstance, const wchar_t *pattern,
HWND parent_window );
void mainLoop();
static LRESULT CALLBACK messageHandler( HWND hwnd, UINT umsg, WPARAM wParam,
LPARAM lParam );
bool accepted();
const wchar_t *getPattern();
~PatternWindow() {
EnableWindow( parent, true );
SetFocus( parent );
}
private:
2020-04-01 11:54:19 +00:00
enum DialogResult { DIA_OK, DIA_Cancel };
2020-02-25 15:11:25 +00:00
void storePattern();
HWND window;
HWND pattern_input;
HWND parent;
enum DialogResult result;
wchar_t pattern[2048];
const int window_width{ 215 };
const int window_height{ 150 };
static PatternWindow *pw;
};