/*****************************************************************************
Open Source MIT License

Copyright (c) 2017 Matthew Ahmed

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*****************************************************************************/

// PrefDlg.h: interface for the CPrefDlg class.
//
//////////////////////////////////////////////////////////////////////

#pragma once

#include "ZWinDlg.h"

BOOL PrefDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);

class CPrefDlg : public ZDlg  
{
public:
	CPrefDlg(HINSTANCE hInst, CSettings * pSet, LPCTSTR sDirSlash, // LPCTSTR sCapt1,
           LPCTSTR sCapt2 = NULL, ZWin * pOwner = NULL, ZWinAppData * pzwd = NULL);
	~CPrefDlg();
	BOOL OwnProc(HWND hDlg, UINT uMsg, WPARAM wP, LPARAM lP);

protected:
	CSettings * ini;

//  TCHAR m_sOwnDir[MAX_PATH];
  TCHAR m_sLogDir[MAX_PATH];

//  HWND m_hCkLogFlush;

  HWND m_haSpins[6];
  HWND m_haEds[6];
  void OnNotifySpin(LPNMUPDOWN pud);
  void OnEdReps(WPARAM wP, LPARAM lP);
  void InitRepsSpinEdit();
  BOOL m_bEdChangeBySpinner;
  void OnBnReset();

  HWND m_hDefSpin;
  HWND m_hDefEd;


  HANDLE m_hnImgStars;
  RECT m_rcImgStars;
  void OnWmPaint();

	BOOL OnInitDialog();
//  void OnCkLog(WPARAM wP, LPARAM lP);
  void OnBnHelp();
	void OnOk();
};

