-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHRULE.CPP
58 lines (44 loc) · 1.31 KB
/
HRULE.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
// HRule.cpp: implementation of the HRule class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Virtual Robot.h"
#include "HRule.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
HRule::HRule()
{
}
HRule::~HRule()
{
}
BEGIN_MESSAGE_MAP(HRule, baseCMyBar)
//{{AFX_MSG_MAP(VRule)
ON_WM_CREATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
int HRule::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (baseCMyBar::OnCreate(lpCreateStruct) == -1)
return -1;
SetSCBStyle(GetSCBStyle() | SCBS_SIZECHILD);
ModifyStyle(CBRS_GRIPPER|CBRS_BORDER_3D,0);
HRuler.Create(WS_CHILD|WS_VISIBLE,CRect(0,0,0,0),this,699);
HRuler.SetMargin( 280 );
HRuler.SetBackGroundColor( RGB( 200 , 200 , 255 ) );
HRuler.SetSeperatorSize( 4 );
HRuler.SetMilimeterPixel( 2 );
HRuler.AddSeperator( 0 , 1 );
HRuler.AddSeperator( 20 , 2 );
HRuler.AddSeperator( 35 , 3 , SEPTYPE_NOPOSCHANGE );
HRuler.AddSeperator( 56 , 4 , 0 , NULL , RGB( 0 , 0 , 0 ) , RGB( 255 , 0 , 0 ) , 20 , 56 );
HRuler.AddSeperator( 130 , 5 );
HRuler.SetStyle( RWSTYLE_HORZ | RWSTYLE_TOPALIGN );
return 0;
}