-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathStepDialog.cpp
52 lines (44 loc) · 985 Bytes
/
StepDialog.cpp
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
41
42
43
44
45
46
47
48
49
50
51
52
#include "StepDialog.h"
#include "ModelWindow.h"
#include "Resource.h"
#include <TCFoundation/TCAlertManager.h>
#include <LDLoader/LDLMainModel.h>
#include <CUI/CUIWindowResizer.h>
#if defined(_MSC_VER) && _MSC_VER >= 1400 && defined(_DEBUG)
#define new DEBUG_CLIENTBLOCK
#endif // _DEBUG
StepDialog::StepDialog(CUIWindow *parentWindow, LDrawModelViewer *modelViewer):
CUIDialog(parentWindow),
m_modelViewer(modelViewer),
m_step(-1)
{
}
StepDialog::~StepDialog(void)
{
}
void StepDialog::dealloc(void)
{
CUIDialog::dealloc();
}
INT_PTR StepDialog::doModal(void)
{
return CUIDialog::doModal(IDD_STEP, parentWindow->getHWindow());
}
BOOL StepDialog::doInitDialog(HWND hKbControl)
{
windowSetValue(IDC_STEP_FIELD, (long)m_modelViewer->getStep());
return CUIDialog::doInitDialog(hKbControl);
}
void StepDialog::doOK(void)
{
long value;
if (windowGetValue(IDC_STEP_FIELD, value))
{
m_step = (int)value;
CUIDialog::doOK();
}
else
{
MessageBeep(MB_ICONASTERISK);
}
}