Skip to content

Commit

Permalink
#5 redesign video config settings dialog.
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenhoving committed Jun 2, 2018
1 parent 957fd50 commit 54253bc
Show file tree
Hide file tree
Showing 30 changed files with 1,150 additions and 300 deletions.
2 changes: 2 additions & 0 deletions CamCapture/include/CamCapture/cam_rect.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

#include "cam_size.h"
#include "cam_point.h"
#include <optional>
#include <string>

template<typename T>
class rect
Expand Down
6 changes: 3 additions & 3 deletions CamHook/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@
// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef WINVER // Specifies that the minimum required platform is Windows Vista.
#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
#define WINVER 0x0601 // Change this to the appropriate value to target other versions of Windows.
#endif

#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista.
#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
#define _WIN32_WINNT 0x0601 // Change this to the appropriate value to target other versions of Windows.
#endif

#ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
#endif

#ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0.
#define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE.
#define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE.
#endif

#include <afxwin.h> // MFC core and standard components
Expand Down
6 changes: 3 additions & 3 deletions CamLib/targetver.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef WINVER // Specifies that the minimum required platform is Windows Vista.
#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
#define WINVER 0x0601 // Change this to the appropriate value to target other versions of Windows.
#endif

#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista.
#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
#define _WIN32_WINNT 0x0601 // Change this to the appropriate value to target other versions of Windows.
#endif

#ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
#endif

#ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0.
#define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE.
#define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE.
#endif
6 changes: 3 additions & 3 deletions CamStudioPlayerPlus/targetver.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef WINVER // Specifies that the minimum required platform is Windows Vista.
#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
#define WINVER 0x0601 // Change this to the appropriate value to target other versions of Windows.
#endif

#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista.
#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
#define _WIN32_WINNT 0x0601 // Change this to the appropriate value to target other versions of Windows.
#endif

#ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
#endif

#ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0.
#define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE.
#define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE.
#endif
4 changes: 3 additions & 1 deletion CamStudioRecorder/AudioFormatDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ BOOL CAudioFormatDlg::GetFormatDescription(CString &rstrFormatTag, CString &rstr
strChannels.Format(_T("%s"), (1 == m_pwfx->nChannels) ? _T("Mono") : _T("Stereo"));

CString formatstr;
formatstr = strSamplesPerSecond + ", ";
formatstr.Append(strSamplesPerSecond);
formatstr.Append(CString(", "));

if (0 < m_pwfx->wBitsPerSample)
formatstr = formatstr + strBitsPerSample + ", ";
formatstr = formatstr + strChannels + " " + strAvgBytesPerSecond;
Expand Down
8 changes: 8 additions & 0 deletions CamStudioRecorder/AutopanSpeedDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ BEGIN_MESSAGE_MAP(CAutopanSpeedDlg, CDialog)
//{{AFX_MSG_MAP(CAutopanSpeedDlg)
ON_WM_HSCROLL()
//}}AFX_MSG_MAP
ON_BN_CLICKED(IDOK, &CAutopanSpeedDlg::OnBnClickedOk)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -84,3 +85,10 @@ void CAutopanSpeedDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar *pScrollBar

CDialog::OnHScroll(nSBCode, nPos, pScrollBar);
}


void CAutopanSpeedDlg::OnBnClickedOk()
{
// TODO: Add your control notification handler code here
CDialog::OnOK();
}
2 changes: 2 additions & 0 deletions CamStudioRecorder/AutopanSpeedDlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class CAutopanSpeedDlg : public CDialog
private:
CSliderCtrl m_ctrlSliderPanSpeed;
CStatic m_ctrlStaticMaxSpeed;
public:
afx_msg void OnBnClickedOk();
};

//{{AFX_INSERT_LOCATION}}
Expand Down
30 changes: 23 additions & 7 deletions CamStudioRecorder/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,18 @@

project(CamStudioRecorder)

set(RECORDER_NEW_SOURCE
# new
video_settings_ui.h
video_settings_ui.cpp
string_convert.h
capture_thread.h
capture_thread.cpp
utility/make_array.h
)

set(RECORDER_SOURCE
# legacy
AudioFormatDlg.cpp
AudioFormatDlg.h
AudioMixer.cpp
Expand Down Expand Up @@ -102,13 +113,8 @@ set(RECORDER_SOURCE
RecorderVersionReleaseInfo.h
RecorderView.h
ResizeDlg.h
resource.h
targetver.h
TransparentWnd.h
VideoWnd.h
string_convert.h
capture_thread.h
capture_thread.cpp
)

set(RECORDER_VFW_SOURCE
Expand All @@ -131,11 +137,14 @@ set(RECORDER_ADDONS_SOURCE

set(RECORDER_RESOURCE
Recorder.rc
resource.h
targetver.h
)

set(CMAKE_MFC_FLAG 2)

add_executable(CamStudioRecorder WIN32
${RECORDER_NEW_SOURCE}
${RECORDER_SOURCE}
${RECORDER_RESOURCE}
${RECORDER_VFW_SOURCE}
Expand All @@ -151,10 +160,17 @@ source_group(addons FILES
)

source_group(src FILES
${RECORDER_SOURCE}
${RECORDER_NEW_SOURCE}
)

source_group(resource FILES
${RECORDER_RESOURCE}
)

source_group(src\\legacy FILES
${RECORDER_SOURCE}
)

target_include_directories(CamStudioRecorder
PUBLIC
.
Expand All @@ -168,7 +184,7 @@ target_compile_definitions(CamStudioRecorder
-D_AFXDLL=1
-D_UNICODE
-DUNICODE
# silence codecvt deprication warning for now
# silence codecvt deprecation warning for now
-D_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
)

Expand Down
8 changes: 8 additions & 0 deletions CamStudioRecorder/EditTransparencyDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ BEGIN_MESSAGE_MAP(CEditTransparencyDlg, CDialog)
ON_BN_CLICKED(IDC_CHECK1, OnCheck1)
ON_WM_HSCROLL()
//}}AFX_MSG_MAP
ON_BN_CLICKED(IDOK, &CEditTransparencyDlg::OnBnClickedOk)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -115,3 +116,10 @@ void CEditTransparencyDlg::OnCancel()

CDialog::OnCancel();
}


void CEditTransparencyDlg::OnBnClickedOk()
{
// TODO: Add your control notification handler code here
CDialog::OnOK();
}
2 changes: 2 additions & 0 deletions CamStudioRecorder/EditTransparencyDlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ class CEditTransparencyDlg : public CDialog
CStatic m_ctrlStaticTransparency;

protected:
public:
afx_msg void OnBnClickedOk();
};

//{{AFX_INSERT_LOCATION}}
Expand Down
20 changes: 10 additions & 10 deletions CamStudioRecorder/ListManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ int CListManager::RemoveDisplayArray(CTransparentWnd *removeWnd, int wantDestroy
{
int found = 0;

int max = displayArray.GetSize();
int max = (int)displayArray.GetSize();
CTransparentWnd *itemWnd = nullptr;
for (int i = 0; i < max; i++)
{
Expand Down Expand Up @@ -259,7 +259,7 @@ int CListManager::RemoveLayoutArray(CLayoutList *pLayout, int wantDestroyLayout)
{
int found = 0;

int max = layoutArray.GetSize();
int max = (int)layoutArray.GetSize();
CLayoutList *itemLayout = nullptr;
for (int i = max - 1; i >= 0; i--)
{
Expand Down Expand Up @@ -298,7 +298,7 @@ int CListManager::DestroyLayout(CLayoutList *pLayout)

int CListManager::DestroyArrayItems(CArray<CTransparentWnd *, CTransparentWnd *> *removeArray)
{
int max = removeArray->GetSize();
int max = (int)removeArray->GetSize();
CTransparentWnd *itemWnd = nullptr;
for (int i = max - 1; 0 <= i; i--)
{
Expand Down Expand Up @@ -329,7 +329,7 @@ CArray<CTransparentWnd *, CTransparentWnd *> *CListManager::CloneDisplayArray()
// TODO, Possible memory leak, where is the delete operation of the new below done?
CArray<CTransparentWnd *, CTransparentWnd *> *cloneArray = new CArray<CTransparentWnd *, CTransparentWnd *>;

int max = displayArray.GetSize();
int max = (int)displayArray.GetSize();
CTransparentWnd *itemWnd = nullptr;
for (int i = 0; i < max; i++)
{
Expand Down Expand Up @@ -361,7 +361,7 @@ int CListManager::FreeDisplayArray()
int CListManager::FreeLayoutArray()
{
// Free Multiple Lists
int max = layoutArray.GetSize();
int max = (int)layoutArray.GetSize();
for (int i = max - 1; i >= 0; i--)
{
CLayoutList *pLayout = layoutArray[i];
Expand All @@ -380,7 +380,7 @@ CArray<CTransparentWnd *, CTransparentWnd *> *CListManager::CloneLayoutArrayPtr(
// TODO, Possible memory leak, where is the delete operation of the new below done?
CArray<CTransparentWnd *, CTransparentWnd *> *cloneArray = new CArray<CTransparentWnd *, CTransparentWnd *>;

int max = layoutArrayPtr->GetSize();
int max = (int)layoutArrayPtr->GetSize();
for (int i = 0; i < max; i++)
{
CTransparentWnd *itemWnd = (*layoutArrayPtr)[i];
Expand Down Expand Up @@ -425,7 +425,7 @@ int CListManager::SwapShapeArray(long uniqueID1, long uniqueID2)
int swapItem1 = -1;
int swapItem2 = -1;

int max = shapeArray.GetSize();
int max = (int)shapeArray.GetSize();
for (int i = 0; i < max; i++)
{
CTransparentWnd *itemWnd = shapeArray[i];
Expand Down Expand Up @@ -460,7 +460,7 @@ int CListManager::SwapLayoutArray(long uniqueID1, long uniqueID2)
int swapItem1 = -1;
int swapItem2 = -1;

int max = layoutArray.GetSize();
int max = (int)layoutArray.GetSize();
CLayoutList *itemLayout = nullptr;
for (int i = 0; i < max; i++)
{
Expand Down Expand Up @@ -575,7 +575,7 @@ int CListManager::SaveLayout(CString saveDir)
long fileversion = 100;
fwrite((void *)&fileversion, sizeof(long), 1, fptr);

int max = layoutArray.GetSize();
int max = (int)layoutArray.GetSize();
fwrite((void *)&max, sizeof(int), 1, fptr); // Number of Shapes

int reserve[100];
Expand Down Expand Up @@ -643,7 +643,7 @@ int CListManager::SaveLayoutArrayToFile(CArray<CTransparentWnd *, CTransparentWn
// Ensure window is on the top of display list
void CListManager::EnsureOnTopList(CTransparentWnd *transWnd)
{
int max = displayArray.GetSize();
int max = (int)displayArray.GetSize();
if (max <= 0)
return;
if (transWnd == displayArray[max - 1])
Expand Down
4 changes: 2 additions & 2 deletions CamStudioRecorder/MainFrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ static UINT indicators[] = {

CMainFrame::CMainFrame()
{
#ifdef _DEBUG
//#ifdef _DEBUG
console::create();
#endif
//#endif
// TODO: add member initialization code here
m_bmLogo.LoadBitmap(IDB_BITMAP3);
}
Expand Down
2 changes: 1 addition & 1 deletion CamStudioRecorder/MouseCaptureWnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void DrawSelect(HDC hdc, BOOL fDraw, LPRECT lprClip)
// MouseCaptureWndProc()
//
/////////////////////////////////////////////////////////////////////////////
long WINAPI MouseCaptureWndProc(HWND hWnd, UINT wMessage, WPARAM wParam, LPARAM lParam)
LRESULT WINAPI MouseCaptureWndProc(HWND hWnd, UINT wMessage, WPARAM wParam, LPARAM lParam)
{
switch (wMessage)
{
Expand Down
2 changes: 1 addition & 1 deletion CamStudioRecorder/MouseCaptureWnd.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ extern HWND g_hWndGlobal;
extern HWND hMouseCaptureWnd;
extern HWND g_hFixedRegionWnd;

long WINAPI MouseCaptureWndProc(HWND hWnd, UINT wMessage, WPARAM wParam, LPARAM lParam);
LRESULT WINAPI MouseCaptureWndProc(HWND hWnd, UINT wMessage, WPARAM wParam, LPARAM lParam);
bool CreateShiftWindow();
int DestroyShiftWindow();

Expand Down
2 changes: 1 addition & 1 deletion CamStudioRecorder/Recorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ BOOL CRecorderApp::InitInstance()
// MessageBox(nullptr, "CamStudio.cfg Config file was not found. Using defaults.", "Error", MB_OK);
// return(EXIT_FAILURE);
}
catch (const libconfig::ParseException &pex)
catch (const libconfig::ParseException & /*pex*/)
{
TCHAR buf[1024];

Expand Down
Loading

0 comments on commit 54253bc

Please sign in to comment.