Skip to content

Commit

Permalink
[New] Fill Random Data option, based on MersenneTwister random number…
Browse files Browse the repository at this point in the history
… engine (#33).

[Changes] "Fill With Data" dialog redesigned.
Menu naming unification.
  • Loading branch information
jovibor committed Feb 16, 2021
1 parent e131b9a commit 2a51d4f
Show file tree
Hide file tree
Showing 12 changed files with 249 additions and 118 deletions.
2 changes: 1 addition & 1 deletion HexCtrl/HexCtrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ namespace HEXCTRL
[[nodiscard]] virtual auto GetSelection()const->std::vector<HEXSPANSTRUCT> = 0; //Get current selection.
[[nodiscard]] virtual HWND GetWindowHandle(EHexWnd enWnd)const = 0; //Retrieves control's window/dialog handle.
virtual void GoToOffset(ULONGLONG ullOffset, int iRelPos = 0) = 0; //Go (scroll) to a given offset.
[[nodiscard]] virtual bool HasSelection()const = 0; //Does have currently any selection or not.
[[nodiscard]] virtual bool HasSelection()const = 0; //Does currently have any selection or not.
[[nodiscard]] virtual auto HitTest(POINT pt, bool fScreen = true)const->std::optional<HEXHITTESTSTRUCT> = 0; //HitTest given point.
[[nodiscard]] virtual bool IsCmdAvail(EHexCmd enCmd)const = 0; //Is given Cmd currently available (can be executed)?
[[nodiscard]] virtual bool IsCreated()const = 0; //Shows whether control is created or not.
Expand Down
2 changes: 1 addition & 1 deletion HexCtrl/HexCtrlDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ namespace HEXCTRL
********************************************************************************************/
enum class EHexModifyMode : WORD
{
MODIFY_DEFAULT, MODIFY_REPEAT, MODIFY_OPERATION
MODIFY_DEFAULT, MODIFY_REPEAT, MODIFY_OPERATION, MODIFY_RANDOM
};

/********************************************************************************************
Expand Down
57 changes: 26 additions & 31 deletions HexCtrl/res/HexCtrl.rc
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ BEGIN
CONTROL "DWORD",IDC_HEXCTRL_OPERS_RADIO_DWORD,"Button",BS_AUTORADIOBUTTON,85,67,38,8
CONTROL "QWORD",IDC_HEXCTRL_OPERS_RADIO_QWORD,"Button",BS_AUTORADIOBUTTON,127,67,38,8
GROUPBOX "Data region to modify:",IDC_STATIC,128,84,117,25
CONTROL "All",IDC_HEXCTRL_OPERS_RADIO_ALL,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,140,95,23,8
CONTROL "All",IDC_HEXCTRL_OPERS_RADIO_ALL,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,140,95,19,8
CONTROL "Selection",IDC_HEXCTRL_OPERS_RADIO_SEL,"Button",BS_AUTORADIOBUTTON,166,95,40,8
DEFPUSHBUTTON "OK",IDOK,66,117,50,14,BS_FLAT
PUSHBUTTON "Cancel",IDCANCEL,135,117,50,14,BS_FLAT
Expand All @@ -120,23 +120,22 @@ BEGIN
LTEXT "Operand:",IDC_STATIC,95,30,31,8
END

IDD_HEXCTRL_FILLDATA DIALOGEX 0, 0, 269, 96
IDD_HEXCTRL_FILLDATA DIALOGEX 0, 0, 243, 108
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_TOOLWINDOW | WS_EX_WINDOWEDGE
CAPTION "Fill with data..."
CAPTION "Fill With Data..."
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,80,75,50,14
PUSHBUTTON "Cancel",IDCANCEL,139,75,50,14
COMBOBOX IDC_HEXCTRL_FILLDATA_COMBO_DATA,48,32,200,30,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
CONTROL "Hex values",IDC_HEXCTRL_FILLDATA_RADIO_HEX,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,48,20,48,8
CONTROL "Text / ASCII",IDC_HEXCTRL_FILLDATA_RADIO_TEXT,"Button",BS_AUTORADIOBUTTON,102,20,52,8
CONTROL "Text / UTF-16 (Unicode)",IDC_HEXCTRL_FILLDATA_RADIO_UTF16,
"Button",BS_AUTORADIOBUTTON,159,20,90,8
LTEXT "Fill data:",IDC_STATIC,15,34,28,8
CONTROL "All",IDC_HEXCTRL_FILLDATA_RADIO_ALL,"Button",BS_AUTORADIOBUTTON | WS_GROUP,182,48,21,10
CONTROL "Selection",IDC_HEXCTRL_FILLDATA_RADIO_SEL,"Button",BS_AUTORADIOBUTTON,208,48,40,10
GROUPBOX "",IDC_STATIC,8,7,253,55
DEFPUSHBUTTON "OK",IDOK,67,85,50,14
PUSHBUTTON "Cancel",IDCANCEL,126,85,50,14
COMBOBOX IDC_HEXCTRL_FILLDATA_COMBO_DATA,48,32,177,30,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
LTEXT "Fill data:",IDC_STATIC,17,34,28,8
CONTROL "All",IDC_HEXCTRL_FILLDATA_RADIO_ALL,"Button",BS_AUTORADIOBUTTON | WS_GROUP,151,59,17,8
CONTROL "Selection",IDC_HEXCTRL_FILLDATA_RADIO_SEL,"Button",BS_AUTORADIOBUTTON,177,59,40,8
GROUPBOX "Filling Options:",IDC_STATIC,6,4,232,75
GROUPBOX "Data region to modify:",IDC_STATIC,139,48,86,25
COMBOBOX IDC_HEXCTRL_FILLDATA_COMBO_TYPE,48,17,177,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Fill type:",IDC_STATIC,17,19,28,8
END

IDD_HEXCTRL_BKMMGR DIALOGEX 0, 0, 365, 271
Expand Down Expand Up @@ -265,10 +264,6 @@ BEGIN

IDD_HEXCTRL_FILLDATA, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 262
TOPMARGIN, 6
BOTTOMMARGIN, 89
END

IDD_HEXCTRL_BKMMGR, DIALOG
Expand Down Expand Up @@ -453,15 +448,15 @@ BEGIN
END
POPUP "Bookmarks"
BEGIN
MENUITEM "Add bookmark", IDM_HEXCTRL_BKM_ADD
MENUITEM "Remove bookmark", IDM_HEXCTRL_BKM_REMOVE
MENUITEM "Add Bookmark", IDM_HEXCTRL_BKM_ADD
MENUITEM "Remove Bookmark", IDM_HEXCTRL_BKM_REMOVE
MENUITEM SEPARATOR
MENUITEM "Go next bookmark", IDM_HEXCTRL_BKM_NEXT
MENUITEM "Go previous bookmark", IDM_HEXCTRL_BKM_PREV
MENUITEM "Go Next Bookmark", IDM_HEXCTRL_BKM_NEXT
MENUITEM "Go Previous Bookmark", IDM_HEXCTRL_BKM_PREV
MENUITEM SEPARATOR
MENUITEM "Clear all bookmarks", IDM_HEXCTRL_BKM_CLEARALL
MENUITEM "Clear All Bookmarks", IDM_HEXCTRL_BKM_CLEARALL
MENUITEM SEPARATOR
MENUITEM "Bookmarks manager", IDM_HEXCTRL_BKM_DLG_MANAGER
MENUITEM "Bookmarks Manager", IDM_HEXCTRL_BKM_DLG_MANAGER
END
POPUP "Clipboard"
BEGIN
Expand All @@ -483,8 +478,8 @@ BEGIN
POPUP "Modify"
BEGIN
MENUITEM "Operations...", IDM_HEXCTRL_MODIFY_DLG_OPERS
MENUITEM "Fill with zeros", IDM_HEXCTRL_MODIFY_FILLZEROS
MENUITEM "Fill with data...", IDM_HEXCTRL_MODIFY_DLG_FILLDATA
MENUITEM "Fill With Zeros", IDM_HEXCTRL_MODIFY_FILLZEROS
MENUITEM "Fill With Data...", IDM_HEXCTRL_MODIFY_DLG_FILLDATA
MENUITEM SEPARATOR
MENUITEM "Undo", IDM_HEXCTRL_MODIFY_UNDO
MENUITEM "Redo", IDM_HEXCTRL_MODIFY_REDO
Expand All @@ -494,7 +489,7 @@ BEGIN
MENUITEM "Mark Selection Start", IDM_HEXCTRL_SEL_MARKSTART
MENUITEM "Mark Selection End", IDM_HEXCTRL_SEL_MARKEND
MENUITEM SEPARATOR
MENUITEM "Select all", IDM_HEXCTRL_SEL_ALL
MENUITEM "Select All", IDM_HEXCTRL_SEL_ALL
END
POPUP "Data View"
BEGIN
Expand All @@ -503,11 +498,11 @@ BEGIN
END
POPUP "Appearance"
BEGIN
MENUITEM "Increase font size\tCtrl+MouseWheelUp", IDM_HEXCTRL_APPEAR_FONTINC
MENUITEM "Decrease font size\tCtrl+MouseWheelDown", IDM_HEXCTRL_APPEAR_FONTDEC
MENUITEM "Increase Font Size\tCtrl+MouseWheelUp", IDM_HEXCTRL_APPEAR_FONTINC
MENUITEM "Decrease Font Size\tCtrl+MouseWheelDown", IDM_HEXCTRL_APPEAR_FONTDEC
MENUITEM SEPARATOR
MENUITEM "Increase capacity\tCtrl+Shift+MouseWheelUp", IDM_HEXCTRL_APPEAR_CAPACINC
MENUITEM "Decrease capacity\tCtrl+Shift+MouseWheelDown", IDM_HEXCTRL_APPEAR_CAPACDEC
MENUITEM "Increase Capacity\tCtrl+Shift+MouseWheelUp", IDM_HEXCTRL_APPEAR_CAPACINC
MENUITEM "Decrease Capacity\tCtrl+Shift+MouseWheelDown", IDM_HEXCTRL_APPEAR_CAPACDEC
END
MENUITEM SEPARATOR
POPUP "Other"
Expand Down
66 changes: 32 additions & 34 deletions HexCtrl/res/HexCtrlRes.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,38 +52,36 @@
#define IDC_HEXCTRL_OPERS_RADIO_ALL 9229
#define IDC_HEXCTRL_OPERS_RADIO_SEL 9230
#define IDC_HEXCTRL_FILLDATA_COMBO_DATA 9231
#define IDC_HEXCTRL_FILLDATA_RADIO_HEX 9232
#define IDC_HEXCTRL_FILLDATA_RADIO_TEXT 9233
#define IDC_HEXCTRL_FILLDATA_RADIO_UTF16 9234
#define IDC_HEXCTRL_FILLDATA_RADIO_ALL 9235
#define IDC_HEXCTRL_FILLDATA_RADIO_SEL 9236
#define IDC_HEXCTRL_BKMMGR_LIST 9237
#define IDC_HEXCTRL_BKMPROPS_EDIT_OFFSET 9238
#define IDC_HEXCTRL_BKMPROPS_EDIT_LENGTH 9239
#define IDC_HEXCTRL_BKMPROPS_COLOR_BK 9240
#define IDC_HEXCTRL_BKMPROPS_COLOR_TEXT 9241
#define IDC_HEXCTRL_BKMPROPS_EDIT_DESCR 9242
#define IDC_HEXCTRL_BKMMGR_RADIO_DEC 9243
#define IDC_HEXCTRL_BKMMGR_RADIO_HEX 9244
#define IDC_HEXCTRL_DATAINTERP_PROPDATA 9245
#define IDC_HEXCTRL_DATAINTERP_RADIO_LE 9246
#define IDC_HEXCTRL_DATAINTERP_RADIO_BE 9247
#define IDC_HEXCTRL_DATAINTERP_RADIO_DEC 9248
#define IDC_HEXCTRL_DATAINTERP_RADIO_HEX 9249
#define IDC_HEXCTRL_ENCODING_LIST 9250
#define IDC_HEXCTRL_CALLBACK_STATIC_OPERNAME 9251
#define IDC_HEXCTRL_CALLBACK_PROGBAR 9252
#define IDC_HEXCTRL_GOTO_EDIT_GOTO 9253
#define IDC_HEXCTRL_GOTO_RADIO_OFFSET 9254
#define IDC_HEXCTRL_GOTO_RADIO_PAGE 9255
#define IDC_HEXCTRL_GOTO_RADIO_ABS 9256
#define IDC_HEXCTRL_GOTO_RADIO_FWDCURR 9257
#define IDC_HEXCTRL_GOTO_RADIO_BACKCURR 9258
#define IDC_HEXCTRL_GOTO_RADIO_BACKEND 9259
#define IDC_HEXCTRL_GOTO_STATIC_OFFTOTAL 9260
#define IDC_HEXCTRL_GOTO_STATIC_OFFRANGE 9261
#define IDC_HEXCTRL_GOTO_STATIC_PAGETOTAL 9262
#define IDC_HEXCTRL_GOTO_STATIC_PAGERANGE 9263
#define IDC_HEXCTRL_FILLDATA_COMBO_TYPE 9232
#define IDC_HEXCTRL_FILLDATA_RADIO_ALL 9233
#define IDC_HEXCTRL_FILLDATA_RADIO_SEL 9234
#define IDC_HEXCTRL_BKMMGR_LIST 9235
#define IDC_HEXCTRL_BKMPROPS_EDIT_OFFSET 9236
#define IDC_HEXCTRL_BKMPROPS_EDIT_LENGTH 9237
#define IDC_HEXCTRL_BKMPROPS_COLOR_BK 9238
#define IDC_HEXCTRL_BKMPROPS_COLOR_TEXT 9239
#define IDC_HEXCTRL_BKMPROPS_EDIT_DESCR 9240
#define IDC_HEXCTRL_BKMMGR_RADIO_DEC 9241
#define IDC_HEXCTRL_BKMMGR_RADIO_HEX 9242
#define IDC_HEXCTRL_DATAINTERP_PROPDATA 9243
#define IDC_HEXCTRL_DATAINTERP_RADIO_LE 9244
#define IDC_HEXCTRL_DATAINTERP_RADIO_BE 9245
#define IDC_HEXCTRL_DATAINTERP_RADIO_DEC 9246
#define IDC_HEXCTRL_DATAINTERP_RADIO_HEX 9247
#define IDC_HEXCTRL_ENCODING_LIST 9248
#define IDC_HEXCTRL_CALLBACK_STATIC_OPERNAME 9249
#define IDC_HEXCTRL_CALLBACK_PROGBAR 9250
#define IDC_HEXCTRL_GOTO_EDIT_GOTO 9251
#define IDC_HEXCTRL_GOTO_RADIO_OFFSET 9252
#define IDC_HEXCTRL_GOTO_RADIO_PAGE 9253
#define IDC_HEXCTRL_GOTO_RADIO_ABS 9254
#define IDC_HEXCTRL_GOTO_RADIO_FWDCURR 9255
#define IDC_HEXCTRL_GOTO_RADIO_BACKCURR 9256
#define IDC_HEXCTRL_GOTO_RADIO_BACKEND 9257
#define IDC_HEXCTRL_GOTO_STATIC_OFFTOTAL 9258
#define IDC_HEXCTRL_GOTO_STATIC_OFFRANGE 9259
#define IDC_HEXCTRL_GOTO_STATIC_PAGETOTAL 9260
#define IDC_HEXCTRL_GOTO_STATIC_PAGERANGE 9261
#define IDM_HEXCTRL_DLG_SEARCH 32769
#define IDM_HEXCTRL_MODIFY_UNDO 32770
#define IDM_HEXCTRL_MODIFY_REDO 32771
Expand Down Expand Up @@ -138,9 +136,9 @@
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 9264
#define _APS_NEXT_RESOURCE_VALUE 9262
#define _APS_NEXT_COMMAND_VALUE 32818
#define _APS_NEXT_CONTROL_VALUE 9264
#define _APS_NEXT_CONTROL_VALUE 9262
#define _APS_NEXT_SYMED_VALUE 9333
#endif
#endif
68 changes: 68 additions & 0 deletions HexCtrl/src/CHexCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <cctype>
#include <fstream>
#include <numeric>
#include <random>
#include <thread>
#pragma comment(lib, "Dwmapi.lib")

Expand Down Expand Up @@ -3176,12 +3177,17 @@ void CHexCtrl::ModifyData(const HEXMODIFY& hms)
case EHexModifyMode::MODIFY_DEFAULT:
ModifyDefault(hms);
break;
case EHexModifyMode::MODIFY_RANDOM:
ModifyRandom(hms);
break;
case EHexModifyMode::MODIFY_REPEAT:
ModifyRepeat(hms);
break;
case EHexModifyMode::MODIFY_OPERATION:
ModifyOperation(hms);
break;
default:
break;
}

ParentNotify(HEXCTRL_MSG_SETDATA);
Expand Down Expand Up @@ -3260,6 +3266,67 @@ void CHexCtrl::ModifyOperation(const HEXMODIFY& hms)
thrd.join();
}

void CHexCtrl::ModifyRandom(const HEXMODIFY& hms)
{
const auto& vecSpanRef = hms.vecSpan;
constexpr auto sizeQuick { 1024 * 256 }; //256KB.
const auto ullTotalSize = std::accumulate(vecSpanRef.begin(), vecSpanRef.end(), 0ULL,
[](ULONGLONG ullSumm, const HEXSPANSTRUCT& ref) {return ullSumm + ref.ullSize; });
assert(ullTotalSize <= GetDataSize());

CHexDlgCallback dlgClbk(L"Modifying...", vecSpanRef.begin()->ullOffset, vecSpanRef.back().ullOffset + vecSpanRef.back().ullSize, this);
std::thread thrd([&]() {
std::random_device rd;
std::mt19937 gen(rd());
std::uniform_int_distribution distrib(0, 255);
for (const auto& iterSpan : vecSpanRef) //Span-vector's size times.
{
ULONGLONG ullSizeChunk { };
ULONGLONG ullChunks { };
CalcChunksFromSize(iterSpan.ullSize, static_cast<ULONGLONG>(hms.enOperSize), ullSizeChunk, ullChunks);

for (ULONGLONG iterChunk = 0; iterChunk < ullChunks; ++iterChunk)
{
const auto ullOffset = iterSpan.ullOffset + (iterChunk * ullSizeChunk);
if (ullOffset + ullSizeChunk > m_ullDataSize) //Overflow check.
ullSizeChunk = m_ullDataSize - ullOffset;
if (ullOffset + ullSizeChunk > iterSpan.ullOffset + iterSpan.ullSize)
ullSizeChunk = (iterSpan.ullOffset + iterSpan.ullSize) - ullOffset;

const auto pData = GetData({ ullOffset, ullSizeChunk });

/************************************************************************************
* Loop for random fill pData.
* An std::generate() could be used here, though the ability to dlgClbk.SetProgress
* would be lost then.
* Although for_loop approach is slower due to constant SetProgress calls,
* in Release build it's pretty fast and, i believe, enough for 99% use cases.
* Also, this loop can further be improved with SIMD methods, if so needed.
************************************************************************************/
for (auto ullIndex { 0ULL }; ullIndex < ullSizeChunk; ++ullIndex)
{
pData[ullIndex] = static_cast<std::byte>(distrib(gen));
if (dlgClbk.IsCanceled())
{
if (m_enDataMode != EHexDataMode::DATA_MEMORY)
SetDataVirtual(pData, { ullOffset, ullSizeChunk });
goto exit;
}
dlgClbk.SetProgress(ullOffset + ullIndex);
}

if (m_enDataMode != EHexDataMode::DATA_MEMORY)
SetDataVirtual(pData, { ullOffset, ullSizeChunk });
}
}
exit:
dlgClbk.ExitDlg();
});
if (ullTotalSize > sizeQuick) //Showing "Cancel" dialog only when data > sizeQuick
dlgClbk.DoModal();
thrd.join();
}

void CHexCtrl::ModifyRepeat(const HEXMODIFY& hms)
{
const auto& vecSpanRef = hms.vecSpan;
Expand Down Expand Up @@ -3331,6 +3398,7 @@ void CHexCtrl::ModifyRepeat(const HEXMODIFY& hms)

pData = GetData({ ullOffset, hms.ullDataSize });
std::copy_n(hms.pData, static_cast<size_t>(hms.ullDataSize), pData);

if (m_enDataMode != EHexDataMode::DATA_MEMORY)
SetDataVirtual(pData, { ullOffset, hms.ullDataSize });

Expand Down
21 changes: 11 additions & 10 deletions HexCtrl/src/CHexCtrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ namespace HEXCTRL::INTERNAL
[[nodiscard]] auto GetSelection()const->std::vector<HEXSPANSTRUCT> override; //Gets current selection.
[[nodiscard]] HWND GetWindowHandle(EHexWnd enWnd)const override; //Retrieves control's window/dialog handle.
void GoToOffset(ULONGLONG ullOffset, int iRelPos = 0)override; //Go (scroll) to a given offset.
[[nodiscard]] bool HasSelection()const override; //Does have currently any selection or not.
[[nodiscard]] bool HasSelection()const override; //Does currently have any selection or not.
[[nodiscard]] auto HitTest(POINT pt, bool fScreen)const->std::optional<HEXHITTESTSTRUCT> override; //HitTest given point.
[[nodiscard]] bool IsCmdAvail(EHexCmd eCmd)const override; //Is given Cmd currently available (can be executed)?
[[nodiscard]] bool IsCreated()const override; //Shows whether control is created or not.
Expand Down Expand Up @@ -131,17 +131,18 @@ namespace HEXCTRL::INTERNAL
void DrawDataInterp(CDC* pDC, CFont* pFont, ULONGLONG ullStartLine, int iLines, std::wstring_view wstrHex, std::wstring_view wstrText)const;
void DrawPageLines(CDC* pDC, ULONGLONG ullStartLine, int iLines);
void FillWithZeros(); //Fill selection with zeros.
[[nodiscard]] auto GetBottomLine()const->ULONGLONG; //Returns current bottom line number in view.
[[nodiscard]] auto GetBottomLine()const->ULONGLONG; //Returns current bottom line number in view.
[[nodiscard]] auto GetCommand(UCHAR uChar, bool fCtrl, bool fShift, bool fAlt)const->std::optional<EHexCmd>; //Get command from keybinding.
[[nodiscard]] auto GetMsgWindow()const->HWND; //Returns pointer to the "Message" window. See HEXDATASTRUCT::pwndMessage.
[[nodiscard]] auto GetTopLine()const->ULONGLONG; //Returns current top line number in view.
void HexChunkPoint(ULONGLONG ullOffset, int& iCx, int& iCy)const; //Point of Hex chunk.
[[nodiscard]] auto GetMsgWindow()const->HWND; //Returns pointer to the "Message" window. See HEXDATASTRUCT::pwndMessage.
[[nodiscard]] auto GetTopLine()const->ULONGLONG; //Returns current top line number in view.
void HexChunkPoint(ULONGLONG ullOffset, int& iCx, int& iCy)const; //Point of Hex chunk.
[[nodiscard]] auto HitTest(POINT pt)const->std::optional<HEXHITTESTSTRUCT>; //Is any hex chunk withing given point?
[[nodiscard]] bool IsCurTextArea()const; //Whether last focus was set at Text or Hex chunks area.
[[nodiscard]] bool IsPageVisible()const; //Returns m_fSectorVisible.
void ModifyDefault(const HEXMODIFY& hms); //EHexModifyMode::MODIFY_DEFAULT
void ModifyOperation(const HEXMODIFY& hms); //EHexModifyMode::MODIFY_OPERATION
void ModifyRepeat(const HEXMODIFY& hms); //EHexModifyMode::MODIFY_REPEAT
[[nodiscard]] bool IsCurTextArea()const; //Whether last focus was set at Text or Hex chunks area.
[[nodiscard]] bool IsPageVisible()const; //Returns m_fSectorVisible.
void ModifyDefault(const HEXMODIFY& hms); //EHexModifyMode::MODIFY_DEFAULT
void ModifyOperation(const HEXMODIFY& hms); //EHexModifyMode::MODIFY_OPERATION
void ModifyRandom(const HEXMODIFY& hms); //EHexModifyMode::MODIFY_RANDOM
void ModifyRepeat(const HEXMODIFY& hms); //EHexModifyMode::MODIFY_REPEAT
void MsgWindowNotify(const HEXNOTIFYSTRUCT& hns)const; //Notify routine used to send messages to Msg window.
void MsgWindowNotify(UINT uCode)const; //Same as above, but only for notification code.
void OnCaretPosChange(ULONGLONG ullOffset); //On changing caret position.
Expand Down
Loading

0 comments on commit 2a51d4f

Please sign in to comment.