-
Notifications
You must be signed in to change notification settings - Fork 1
/
PrefDialogTools.cpp
48 lines (37 loc) · 1.31 KB
/
PrefDialogTools.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
#include "stdafx.h"
#include "cedtHeader.h"
#include "PrefDialog.h"
void CPreferenceDialog::InitToolsPage()
{
}
void CPreferenceDialog::SizeToolsPage()
{
INT nPosY;
nPosY = 26; m_stcToolSettingsBox.MoveWindow(170, nPosY, 360, 70);
nPosY += 10; m_chkUseInInternetExplorer.MoveWindow(180, nPosY, 340, 14);
nPosY += 20; m_chkAddToRightMouseButton.MoveWindow(180, nPosY, 340, 14);
nPosY += 15; m_stcAddToRightMouseButton.MoveWindow(198, nPosY, 320, 14);
}
void CPreferenceDialog::ShowToolsPage()
{
INT nCmdShow = (m_nActiveCategory == PREF_CATEGORY_TOOLS) ? SW_SHOW : SW_HIDE;
m_stcToolSettingsBox.ShowWindow(nCmdShow);
m_chkUseInInternetExplorer.ShowWindow(nCmdShow);
m_chkAddToRightMouseButton.ShowWindow(nCmdShow);
m_stcAddToRightMouseButton.ShowWindow(nCmdShow);
}
BOOL CPreferenceDialog::LoadToolsSettings()
{
m_chkUseInInternetExplorer.SetCheck(CCedtApp::IsUsedInInternetExplorer());
m_chkAddToRightMouseButton.SetCheck(CCedtApp::IsAddedToRightMouseButton());
return TRUE;
}
BOOL CPreferenceDialog::SaveToolsSettings()
{
BOOL bResult1 = CCedtApp::UseInInternetExplorer( m_chkUseInInternetExplorer.GetCheck() );
BOOL bResult2 = CCedtApp::AddToRightMouseButton( m_chkAddToRightMouseButton.GetCheck() );
if( ! bResult1 || ! bResult2 ) {
AfxMessageBox(IDS_ERR_TOOLS_APPLY);
return FALSE;
} else return TRUE;
}