-------------------- -------------------- -------------------- -------

 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
//----------------------------------------------------------------------------------
LRESULT CParamsTitleDlg::OnSetParams( WPARAM wParam, LPARAM lParam )
{
TITLE_PARAMS* pNewParams = (TITLE_PARAMS*)wParam;
m_Params.m_Data = *pNewParams;
m_Params.m_Data.lfont.lfHeight = 0;
UpdateData( TRUE );
m_curText = CString(m_Params.m_Data.input_text.c_str());
// m_Slider.SetPos( m_Params.m_Data._iValue );
// SetSliderValue( m_Params.m_Data._iValue );
CComboBox *comboFonts = (CComboBox *)GetDlgItem(IDC_TITLE_FONT_NAME);
int nIndex = 0;
if ((nIndex=comboFonts->FindStringExact(nIndex, m_Params.m_Data.font_name.c_str())) != CB_ERR)
comboFonts->SetCurSel(nIndex);
/*FontStyleBold
FontStyleItalic
FontStyleStrikeout
FontStyleUnderline
FontStyleRegular*/
bcolor_selector.SetColor(m_Params.m_Data.color);
outline_color.SetColor(m_Params.m_Data.color_outline);
width_spin.SetPos(m_Params.m_Data.width);
transp_slider.SetPos( ( m_Params.m_Data.transparency * 100 ) / 255 );
m_TransparencyValue.Format( _T("%i%%"), transp_slider.GetPos() );
std::map<int, double>::const_iterator it;
int pos = 10;
#ifdef in
#undef in
#endif
for each(std::pair<int, double> p in m_scale_map)
if(p.second == m_Params.m_Data.speed / 100.)
pos = p.first;
#ifndef in
#define in
#endif
speed_slider.SetPos(pos);
m_Params.m_Data.speed = m_scale_map[pos] * 100 ;
m_SpeedValue.Format( _T("%1.2fx"), m_scale_map[pos] );
CComboBox *comboAnims = (CComboBox *)GetDlgItem(IDC_TITLE_ANIMATION);
for (int i=0;i < comboAnims->GetCount();i++)
if (comboAnims->GetItemData(i) == m_Params.m_Data.animation_type)
{comboAnims->SetCurSel(i); break;}
// Modified by Buhtoyarov
//CComboBox *comboAnims = (CComboBox *)GetDlgItem(IDC_TITLE_ANIMATION);
for (int i=0;i < comboAnims->GetCount();i++)
if (comboAnims->GetItemData(i) == m_Params.m_Data.animation_type)
{comboAnims->SetCurSel(i); break;}
UpdateData( FALSE );
return 0;
}