Menu

[0b4401]: / PythonScript / src / PromptDialog.h  Maximize  Restore  History

Download this file

41 lines (29 with data), 810 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 BOOL CALLBACK dlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
protected:
virtual BOOL 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
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.