#pragma once

#include <bitset>
#include <vector>

namespace ALX1153
{
	class CEditAnyChars:public CEdit
	{
		typedef std::bitset<256> td_LettersToAllow;
		td_LettersToAllow m_LettersToAllow;

	public:
		CEditAnyChars();

		enum ee_chars
		{
			e_CharsOfUnknown=0,
			//---------------
			e_CharsOfAddSpec,//указать в параметре
			e_CharsOfDelSpec,//указать в параметре
			//---------------
			e_CharsOfAny,
			e_CharsOfNothing,
			//---------------
			e_CharsOfHex,
			e_CharsOfDec,
		};

		bool TestSymbolAndCorrectIfNeed(WPARAM* pWP);
		bool TestSymbolAndCorrectIfNeed(BYTE* pCH);
		unsigned __int64 GetTextLikeHexValue();
		unsigned __int64 GetTextLikeDecValue_nosign();

	private:
		ee_chars m_LastChoosen;//e_CharsOfUnknown

		static unsigned __int64 atoQWORD(const char* pText);

	public:
		void ChooseCharsSet(ee_chars ch=e_CharsOfAny,BYTE* pAddSpec=0,DWORD dwdAddArrayLen=0,BYTE* pDelSpec=0,DWORD dwdDelArrayLen=0);

	protected:
		virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
	};
}