Skip to content

Commit f8919fa

Browse files
author
janhgm
committed
Made Xnote function less prominent visible in the application.
Changed some text to amke it more clear for users what Xnote does. Added a link to the website I introduced. Hi Jan I'll be happy to publish new beta releases regularly. Feel free to increase the size of the About box to allow you to put your text and link into it. XNote Reference check: that would be great. Maybe only show the XNote settings info in the CamStudio Recorder display area if XNote/MotionControl are connected? The less people have to try and figure out, the better ;o) Cheers Nick :o)
1 parent d2e034e commit f8919fa

10 files changed

+171
-75
lines changed

CamStudio/Recorder/AnnotationEffectsOptions.cpp

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ void CAnnotationEffectsOptionsDlg::DoDataExchange(CDataExchange* pDX)
3333
DDX_Control(pDX, IDC_EDIT_IMAGE_PATH, m_ctlImagePath);
3434
DDX_Text(pDX, IDC_EDIT_TIMESTAMP_FORMAT, m_timestamp.text);
3535

36+
DDX_Control(pDX, IDC_BUTTON_XNOTEREMOTECONTROLMODE, m_CheckBoxXnoteRemoteControlMode );
37+
3638
DDX_Text(pDX, IDC_EDIT_XNOTECAMERADELAYINMILLISEC, m_ulXnoteCameraDelayInMilliSec );
3739
DDX_Control(pDX, IDC_BUTTON_XNOTEDISPLAYCAMERADELAYMODE, m_CheckBoxXnoteDisplayCameraDelayMode );
3840

@@ -57,6 +59,7 @@ void CAnnotationEffectsOptionsDlg::DoDataExchange(CDataExchange* pDX)
5759
//TRACE("## -----------------------------------------------\n" );
5860

5961
// Init Checkboxes according the correct state
62+
m_CheckBoxXnoteRemoteControlMode.SetCheck( m_bXnoteRemoteControlMode ? 1 : 0 );
6063
m_CheckBoxXnoteDisplayCameraDelayMode.SetCheck( m_bXnoteDisplayCameraDelayMode ? 1 : 0 );
6164
m_CheckBoxXnoteRecordDurationLimitMode.SetCheck( m_bXnoteRecordDurationLimitMode ? 1 : 0 );
6265

@@ -69,7 +72,9 @@ BEGIN_MESSAGE_MAP(CAnnotationEffectsOptionsDlg, CDialog)
6972

7073
ON_EN_CHANGE(IDC_EDIT_TIMESTAMP_FORMAT, &CAnnotationEffectsOptionsDlg::OnEnChangeEditTimestampFormat)
7174
ON_BN_CLICKED(IDC_BUTTON_TIMESTAMP_FORMAT_OPTIONS, OnBnClickedButtonTimestampFormatOptions)
72-
75+
76+
ON_BN_CLICKED(IDC_BUTTON_XNOTEREMOTECONTROLMODE, &CAnnotationEffectsOptionsDlg::OnBnClickedButtonXnoteRemoteControlMode)
77+
7378
ON_EN_CHANGE(IDC_EDIT_XNOTECAMERADELAYINMILLISEC, &CAnnotationEffectsOptionsDlg::OnEnChangeEditXNoteCameraDelayInMilliSec)
7479
ON_BN_CLICKED(IDC_BUTTON_XNOTEDISPLAYCAMERADELAYMODE, &CAnnotationEffectsOptionsDlg::OnBnClickedXNoteDisplayCameraDelayMode)
7580

@@ -185,9 +190,11 @@ void CAnnotationEffectsOptionsDlg::OnBnClickedOk()
185190
}
186191

187192
// Convert values that are defined by buttons again to bools or other values.
193+
m_bXnoteRemoteControlMode = m_CheckBoxXnoteRemoteControlMode.GetCheck() ? true : false ;
188194
m_bXnoteDisplayCameraDelayMode = m_CheckBoxXnoteDisplayCameraDelayMode.GetCheck() ? true : false ;
189195
m_bXnoteRecordDurationLimitMode = m_CheckBoxXnoteRecordDurationLimitMode.GetCheck() ? true : false ;
190196

197+
Invalidate();
191198
OnOK();
192199
}
193200

@@ -228,23 +235,6 @@ int CAnnotationEffectsOptionsDlg::OnCreate(LPCREATESTRUCT lpCreateStruct)
228235
m_cXnoteDisplayFormatString = CString( cTmpBuff );
229236
}
230237

231-
/*
232-
// janhgm .. this code is now obsolete....
233-
// Check if options are defined. Apply defaults, otherwise nothing will be seen.
234-
if ( m_xnote.textColor == m_xnote.backgroundColor )
235-
{
236-
m_xnote.backgroundColor = RGB(255,255,255);
237-
m_xnote.textColor = RGB(0,0,0);
238-
m_xnote.logfont.lfHeight = 12;
239-
m_xnote.text = m_cXnoteDisplayFormatString;
240-
}
241-
242-
// Todo
243-
// Set here al the values and action you want to msut be doen before windows are launched.
244-
// Update text in Formatpreview(Timestamp) and FormatXnotepreview
245-
//CAnnotationEffectsOptionsDlg::OnEnChangeFormatpreview();
246-
//CAnnotationEffectsOptionsDlg::OnEnChangeFormatXnotepreview();
247-
*/
248238
return 0;
249239
}
250240

@@ -350,3 +340,8 @@ void CAnnotationEffectsOptionsDlg::OnEnChangeFormatpreview()
350340
}
351341

352342
}
343+
344+
void CAnnotationEffectsOptionsDlg::OnBnClickedButtonXnoteRemoteControlMode()
345+
{
346+
// TODO: Add your control notification handler code here
347+
}

CamStudio/Recorder/AnnotationEffectsOptions.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ class CAnnotationEffectsOptionsDlg : public CDialog
3636
TextAttributes m_xnote;
3737
ULONG m_ulXnoteCameraDelayInMilliSec;
3838

39+
CButton m_CheckBoxXnoteRemoteControlMode;
40+
bool m_bXnoteRemoteControlMode; // A bool but says if exteral conttol functions as Xnote Stopwatch and Video Motion Alerter are enabled.
41+
3942
CButton m_CheckBoxXnoteDisplayCameraDelayMode;
4043
bool m_bXnoteDisplayCameraDelayMode; // A bool but dialog requires that checkbox is a CButton.
4144

@@ -67,6 +70,7 @@ class CAnnotationEffectsOptionsDlg : public CDialog
6770
afx_msg void OnEnChangeFormatpreview();
6871

6972
afx_msg void OnEnChangeEditXNoteCameraDelayInMilliSec();
73+
afx_msg void OnBnClickedButtonXnoteRemoteControlMode();
7074
afx_msg void OnBnClickedXNoteDisplayCameraDelayMode();
7175

7276
afx_msg void OnEnChangeEditXnoteRecordDurationLimitInMilliSec();

CamStudio/Recorder/Camstudio4XNote.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
// Define CAMSTUDIO4XNOTE if this is a custom build release for Xnote Stopwatch users (2010/05/28, Janhgm)
77
// Setting this defines will preconfigure a few innitial settings
8-
#define CAMSTUDIO4XNOTE
8+
// #define CAMSTUDIO4XNOTE
99

1010

1111
// Stopwatch sources applications

CamStudio/Recorder/Profile.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,8 +851,10 @@ void CProfile::InitSections()
851851
// Xnote Stopwatch
852852
#ifdef CAMSTUDIO4XNOTE
853853
Add(m_SectionXNote, XNOTEANNOTATION, "xnoteAnnotation", true);
854+
Add(m_SectionXNote, XNOTEREMOTECONTROL, "xnoteRemoteControl", true);
854855
#else
855856
Add(m_SectionXNote, XNOTEANNOTATION, "xnoteAnnotation", false);
857+
Add(m_SectionXNote, XNOTEREMOTECONTROL, "xnoteRemoteControl", false);
856858
#endif
857859
Add(m_SectionXNote, XNOTEDISPLAYCAMERADELAY, "xnoteDisplayCameraDelay", true);
858860
Add(m_SectionXNote, XNOTECAMERADELAYINMILLISEC, "xnoteCameraDelayInMilliSec", 175UL);

CamStudio/Recorder/Profile.h

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ enum eLegacySettings
199199

200200
// XNote
201201
, XNOTEANNOTATION
202+
, XNOTEREMOTECONTROL
202203
, XNOTECAMERADELAYINMILLISEC
203204
, XNOTEDISPLAYCAMERADELAY
204205
, XNOTERECORDDURATIONLIMITINMILLISEC
@@ -1048,34 +1049,38 @@ struct sXNoteOpts
10481049
// settings here are the ones that are initially used for dialog screen..!
10491050
sXNoteOpts()
10501051
#ifdef CAMSTUDIO4XNOTE
1051-
: m_bAnnotation(true) // True, because I did not managed to read info from config
1052+
: m_bAnnotation(true) // True, because I did not managed to read info from config
1053+
, m_bXnoteRemoteControlMode(true) // Default On: We want that externals as Xnote and Video motion alerts are recognoized by Camstudio.
10521054
#else
1053-
: m_bAnnotation(false) // False, default as it should be with stand Camstudio
1055+
: m_bAnnotation(false) // False, default as it should be with stand Camstudio
1056+
, m_bXnoteRemoteControlMode(false) // Default Off: Minimize the Xnote effects in standard Camstudio
10541057
#endif
10551058
, m_taXNote(BOTTOM_LEFT)
10561059
, m_bXnoteDisplayCameraDelayMode(true) // Default On: Show used delay in capture
1057-
, m_ulXnoteCameraDelayInMilliSec(175UL) // Average delay, default 175 ms
1060+
, m_ulXnoteCameraDelayInMilliSec(175UL) // Average delay, default 175 ms
10581061
, m_cXnoteDisplayFormatString("(0000)..00:00:00.000") // Default (Delay) hh:mm:ss.ttt, Not really a format. As long as the timer is not running this will be showed
10591062
, m_bXnoteRecordDurationLimitMode(true) // Default On: Show used delay in capture
10601063
, m_ulXnoteRecordDurationLimitInMilliSec(1750UL) // Average recording duration, default 1750 ms. Required otherwise recording lenght is zero
1061-
, m_ulStartXnoteTickCounter(0) // A non persistent member
1062-
, m_ulSnapXnoteTickCounter(0) // A non persistent member
1063-
, m_cSnapXnoteTimesString("") // A non persistent member
1064+
, m_ulStartXnoteTickCounter(0) // A non persistent member
1065+
, m_ulSnapXnoteTickCounter(0) // A non persistent member
1066+
, m_cSnapXnoteTimesString("") // A non persistent member
10641067
{
10651068
}
10661069
sXNoteOpts(const sXNoteOpts& rhs)
10671070
// copy ala sVideoOpts
10681071
#ifdef CAMSTUDIO4XNOTE
10691072
: m_bAnnotation(true) // True, because I did not managed to read info from config
1073+
, m_bXnoteRemoteControlMode(true) // Default On: We want that externals as Xnote and Video motion alerts are recognoized by Camstudio.
10701074
#else
10711075
: m_bAnnotation(false) // False, default as it should be with stand Camstudio
1076+
, m_bXnoteRemoteControlMode(false) // Default Off: Minimize the Xnote effects in standard Camstudio
10721077
#endif
10731078
, m_taXNote(BOTTOM_LEFT)
1074-
, m_bXnoteDisplayCameraDelayMode(true) // Default On: Show used delay in capture
1079+
, m_bXnoteDisplayCameraDelayMode(true) // Default On: Show used delay in capture
10751080
, m_ulXnoteCameraDelayInMilliSec(175UL) // Average delay, default 175 ms
10761081
, m_cXnoteDisplayFormatString("(0000)..00:00:00.000") // Default hh:mm:ss.ttt, Not really a format. As long as the timer is not running this will be showed
10771082
, m_bXnoteRecordDurationLimitMode(true) // Default On: Show used delay in capture
1078-
, m_ulXnoteRecordDurationLimitInMilliSec(1750UL) // Average recordin duration, default 1750 ms
1083+
, m_ulXnoteRecordDurationLimitInMilliSec(1750UL) // Average recordin duration, default 1750 ms
10791084
, m_ulStartXnoteTickCounter(0UL) // A non persistent member
10801085
, m_ulSnapXnoteTickCounter(0UL) // A non persistent member
10811086
, m_cSnapXnoteTimesString("") // A non persistent member
@@ -1090,6 +1095,7 @@ struct sXNoteOpts
10901095
m_bAnnotation = rhs.m_bAnnotation;
10911096
m_taXNote = rhs.m_taXNote;
10921097

1098+
m_bXnoteRemoteControlMode= rhs.m_bXnoteRemoteControlMode;
10931099
m_bXnoteDisplayCameraDelayMode = rhs.m_bXnoteDisplayCameraDelayMode;
10941100
m_ulXnoteCameraDelayInMilliSec = rhs.m_ulXnoteCameraDelayInMilliSec;
10951101
m_cXnoteDisplayFormatString = rhs.m_cXnoteDisplayFormatString;
@@ -1116,6 +1122,7 @@ struct sXNoteOpts
11161122
VERIFY(cProfile.Read(XNOTEANNOTATION, m_bAnnotation));
11171123
VERIFY(cProfile.Read(XNOTETEXTATTRIBUTES, m_taXNote));
11181124

1125+
VERIFY(cProfile.Read(XNOTEREMOTECONTROL, m_bXnoteRemoteControlMode));
11191126
VERIFY(cProfile.Read(XNOTEDISPLAYCAMERADELAY, m_bXnoteDisplayCameraDelayMode));
11201127
VERIFY(cProfile.Read(XNOTECAMERADELAYINMILLISEC, m_ulXnoteCameraDelayInMilliSec));
11211128
VERIFY(cProfile.Read(XNOTEDISPLAYFORMATSTRING, m_cXnoteDisplayFormatString));
@@ -1137,6 +1144,7 @@ struct sXNoteOpts
11371144
//TRACE("## ----------------------------------------------------------------------------\n");
11381145
//TRACE("## m_bAnnotation : [%d]\n", m_bAnnotation );
11391146
//TRACE("## m_taXNote.text : [%s]\n", m_taXNote.text.GetString() );
1147+
//TRACE("## m_bXnoteRemoteControlMode: [%d]\n", m_bXnoteRemoteControlMode );
11401148
//TRACE("## m_bXnoteDisplayCameraDelayMode : [%d]\n", m_bXnoteDisplayCameraDelayMode );
11411149
//TRACE("## m_ulXnoteCameraDelayInMilliSec : [%lu]\n", m_ulXnoteCameraDelayInMilliSec );
11421150
//TRACE("## m_cXnoteDisplayFormatString : [%s]\n", m_cXnoteDisplayFormatString );
@@ -1152,6 +1160,7 @@ struct sXNoteOpts
11521160
//TRACE("## ----------------------------------------------------------------------------\n");
11531161
//TRACE("## m_bAnnotation : [%d]\n", m_bAnnotation );
11541162
//TRACE("## m_taXNote.text : [%s]\n", m_taXNote.text.GetString() );
1163+
//TRACE("## m_bXnoteRemoteControlMode: [%d]\n", m_bXnoteRemoteControlMode );
11551164
//TRACE("## m_bXnoteDisplayCameraDelayMode : [%d]\n", m_bXnoteDisplayCameraDelayMode );
11561165
//TRACE("## m_ulXnoteCameraDelayInMilliSec : [%lu]\n", m_ulXnoteCameraDelayInMilliSec );
11571166
//TRACE("## m_cXnoteDisplayFormatString : [%s]\n", m_cXnoteDisplayFormatString );
@@ -1174,6 +1183,7 @@ struct sXNoteOpts
11741183
VERIFY(cProfile.Write(XNOTEANNOTATION, m_bAnnotation));
11751184
VERIFY(cProfile.Write(XNOTETEXTATTRIBUTES, m_taXNote));
11761185

1186+
VERIFY(cProfile.Write(XNOTEREMOTECONTROL, m_bXnoteRemoteControlMode));
11771187
VERIFY(cProfile.Write(XNOTEDISPLAYCAMERADELAY, m_bXnoteDisplayCameraDelayMode));
11781188
VERIFY(cProfile.Write(XNOTECAMERADELAYINMILLISEC, m_ulXnoteCameraDelayInMilliSec));
11791189
VERIFY(cProfile.Write(XNOTEDISPLAYFORMATSTRING, m_cXnoteDisplayFormatString));
@@ -1188,6 +1198,9 @@ struct sXNoteOpts
11881198
bool m_bAnnotation;
11891199
TextAttributes m_taXNote;
11901200

1201+
bool m_bXnoteRemoteControlMode;
1202+
CButton m_CheckBoxXnoteRemoteControlMode;
1203+
11911204
bool m_bXnoteDisplayCameraDelayMode;
11921205
ULONG m_ulXnoteCameraDelayInMilliSec;
11931206
CButton m_CheckBoxXnoteDisplayCameraDelayMode;

CamStudio/Recorder/Recorder.cpp

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ class CAboutDlg : public CDialog
5858
virtual BOOL OnInitDialog();
5959
private:
6060
CStatic m_ctrlStaticVersion;
61+
public:
62+
afx_msg void OnStnClickedStaticVersion();
63+
afx_msg void OnBnClickedButtonlink3();
6164
};
6265

6366
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
@@ -79,6 +82,8 @@ BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
7982
ON_BN_CLICKED(IDC_BUTTONLINK, OnButtonlink)
8083
ON_BN_CLICKED(IDC_BUTTONLINK2, OnBnClickedButtonlink2)
8184
//}}AFX_MSG_MAP
85+
ON_STN_CLICKED(IDC_STATIC_VERSION, &CAboutDlg::OnStnClickedStaticVersion)
86+
ON_BN_CLICKED(IDC_BUTTONLINK3, &CAboutDlg::OnBnClickedButtonlink3)
8287
END_MESSAGE_MAP()
8388

8489
BEGIN_EVENTSINK_MAP(CAboutDlg, CDialog)
@@ -92,13 +97,19 @@ BOOL CAboutDlg::OnInitDialog()
9297
// only needs to be done once.
9398
CString strBuffer;
9499
CString strVersionInfo;
95-
strVersionInfo.Format("v%s", CURRENT_VERSION_NUMBER );
100+
strVersionInfo.Format("v%s\n", CURRENT_VERSION_NUMBER );
96101
CString strReleaseInfo;
97-
strReleaseInfo.Format("\nBuild on SVN release: r%s", CURRENT_SVN_RELEASE_NUMBER );
102+
strReleaseInfo.Format("Build on SVN release: r%s\n", CURRENT_SVN_RELEASE_NUMBER );
98103

104+
// CamStudio Recorder <VERSION><RELEASE><XNOTESTOPWATCHSUPPORT><BUGFIXES><COPYRIGHT-1><COPYRIGHT-2>
99105
m_ctrlStaticVersion.GetWindowText(strBuffer);
100106
strBuffer.Replace("<VERSION>", _T(strVersionInfo) );
101107
strBuffer.Replace("<RELEASE>", _T(strReleaseInfo) );
108+
strBuffer.Replace("<XNOTESTOPWATCHSUPPORT>", "\nXNoteStopwatch support coded by JanHgm (www.jahoma.nl/timereg)\n" );
109+
strBuffer.Replace("<BUGFIXES>", "Bugfixes and additional features added by Nick the Geek and others.\n" );
110+
strBuffer.Replace("<COPYRIGHT-1>", "\nCopyright © 2001 RenderSoft Software and Web Publishing\n" );
111+
strBuffer.Replace("<COPYRIGHT-2>", "Copyright © 2008 CamStudio Group && Contributors\n" );
112+
102113
m_ctrlStaticVersion.SetWindowText(strBuffer);
103114

104115
return TRUE; // return TRUE unless you set the focus to a control
@@ -114,7 +125,7 @@ void CAboutDlg::OnBnClickedButtonlink2()
114125
void CAboutDlg::OnButtonlink()
115126
{
116127
// TODO: Add your control notification handler code here
117-
::PostMessage(hWndGlobal,WM_COMMAND,ID_HELP_WEBSITE,0);
128+
::PostMessage(hWndGlobal,WM_COMMAND,ID_CAMSTUDIO4XNOTE_WEBSITE,0);
118129
}
119130

120131
/////////////////////////////////////////////////////////////////////////////
@@ -369,3 +380,14 @@ bool CRecorderApp::RegisterWindowClass()
369380
return true;
370381
}
371382

383+
384+
void CAboutDlg::OnStnClickedStaticVersion()
385+
{
386+
// TODO: Add your control notification handler code here
387+
}
388+
389+
void CAboutDlg::OnBnClickedButtonlink3()
390+
{
391+
// TODO: Add your control notification handler code here
392+
::PostMessage(hWndGlobal,WM_COMMAND,ID_HELP_WEBSITE,0);
393+
}

0 commit comments

Comments
 (0)