-
Notifications
You must be signed in to change notification settings - Fork 2
/
CircleMiniDB.cpp
70 lines (60 loc) · 2.28 KB
/
CircleMiniDB.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//-----------------------------------------------------------------------------
// File: CircleMiniDB.cpp
//
// Desc:
//
// Copyright (c) 2002 Dan
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Includes
#include <windows.h>
#include <commctrl.h>
#include "PolygonManager.h"
#include "CustomMsg.h"
#include "main.h"
#include "resource.h"
#include "MessageProcs.h"
#include "CircleMiniDB.h"
#include "Settings.h"
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Name: OnCubeMini_WMInitDialog()
// Desc:
//-----------------------------------------------------------------------------
void OnCircleMini_WMInitDialog( HWND hWnd )
{
ShowWindow( hWnd, true );
UpdateWindow( hWnd );
PolygonManager->NewBrush( CIRCLEBRUSH );
SetEditI( hWnd, IDC_EDIT_CIRCLE_SIDES, Settings->m_iBrush_Circle_NumSides );
SetEditF( hWnd, IDC_EDIT_CIRCLE_RADIUS, Settings->m_fBrush_Circle_Radius );
SetEditF( hWnd, IDC_EDIT_CIRCLE_DEGREES, Settings->m_fBrush_Circle_Degrees );
}
//-----------------------------------------------------------------------------
// Name: OnCubeMini_WMDestroy()
// Desc:
//-----------------------------------------------------------------------------
void OnCircleMini_WMDestroy( HWND hWnd )
{
UpdateCircleData( hWnd );
EndDialog( hWnd, 0 );
}
//-----------------------------------------------------------------------------
// Name: UpdateCircleData()
// Desc:
//-----------------------------------------------------------------------------
void UpdateCircleData( HWND hWnd )
{
Settings->m_iBrush_Circle_NumSides = GetEditI( hWnd, IDC_EDIT_CIRCLE_SIDES );
Settings->m_fBrush_Circle_Radius = GetEditF( hWnd, IDC_EDIT_CIRCLE_RADIUS );
Settings->m_fBrush_Circle_Degrees = GetEditF( hWnd, IDC_EDIT_CIRCLE_DEGREES );
}
//-----------------------------------------------------------------------------
// Name: OnSheetMini_UpdateBrush()
// Desc:
//-----------------------------------------------------------------------------
void OnCircleMini_UpdateBrush( HWND hWnd )
{
UpdateCircleData( hWnd );
PolygonManager->NewBrush( CIRCLEBRUSH );
}