forked from bruderstein/PythonScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPromptDialog.h
More file actions
40 lines (29 loc) · 816 Bytes
/
PromptDialog.h
File metadata and controls
40 lines (29 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef _PROMPTDIALOG_H
#define _PROMPTDIALOG_H
class PromptDialog
{
public:
enum PROMPT_RESULT
{
RESULT_OK,
RESULT_CANCEL
};
PromptDialog(HINSTANCE hInst, HWND hNotepad);
~PromptDialog();
PROMPT_RESULT showPrompt(const char *prompt, const char *title, const char *initial);
const std::string& getText() { return m_value; }
static INT_PTR CALLBACK dlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
protected:
virtual INT_PTR CALLBACK runDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
HINSTANCE m_hInst;
HWND m_hNotepad;
private:
PromptDialog(); // default constructor disabled
PROMPT_RESULT m_result;
std::string m_value;
std::string m_prompt;
std::string m_title;
std::string m_initial;
HWND m_hSelf;
};
#endif