22 #pragma comment(lib,"imm32.lib")
65template<
int WIDTH = -1>
72 CEditHexDataT(
void) : m_maxLength(-1), m_isInsertMode(false), m_isEnableNotify(false)
73 , m_selectCaretIndex(-1), m_isCaletVisidle(false), m_isShowCaretAlways(false)
78 m_textColor = ::GetSysColor(COLOR_WINDOWTEXT);
79 m_backColor = ::GetSysColor(COLOR_WINDOW);
80 m_activeHighlightColor = ::GetSysColor(COLOR_HIGHLIGHT);
81 m_inactiveHighlightColor = ::GetSysColor(COLOR_BTNSHADOW);
105 m_isInsertMode = isEnable;
117 return m_isInsertMode;
130 m_maxLength = maxLength;
131 m_defaultData = defaultData;
173 _super::GetClientRect(rc);
174 return (rc.Height() + m_charSize.cy - 1) / m_charSize.cy;
188 return (m_data.
GetSize() + WIDTH - 1) / WIDTH;
202 return m_viewPos.y / m_charSize.cy;
227 if ( y != m_viewPos.y )
244 m_SetCaretIndex(index);
254 void SetSel(
int startIndex,
int endIndex)
256 if ( startIndex == endIndex )
259 m_SetCaretIndex(startIndex);
265 endIndex = m_GetIndexMax();
268 m_SetCaretIndex(startIndex,
false,
true);
269 ASSERT( m_caretDrawPos.x >= 0 );
270 m_SetSelect(m_caretIndex, m_caretDrawPos);
271 m_SetCaretIndex(endIndex);
282 void GetSel(
int& _startIndex,
int& _endIndex)
const
284 if ( m_selectCaretIndex < 0 )
287 _startIndex = m_caretIndex;
288 _endIndex = m_caretIndex;
293 _startIndex = m_selectCaretIndex;
294 _endIndex = m_caretIndex;
307 CString s = lpszText;
310 bool nowInsertMode = m_isInsertMode;
311 if ( m_selectCaretIndex >= 0 )
313 m_isInsertMode =
true;
315 m_isEnableNotify =
false;
316 _super::SetRedraw(
false);
318 loop ( i, s.GetLength() )
320 m_Input(s.GetAt(i),
false);
322 _super::SetRedraw(
true);
323 m_isEnableNotify =
true;
324 m_isInsertMode = nowInsertMode;
330 m_DeleteSelectedData();
357 m_toolTip.Create(
this, TTS_ALWAYSTIP);
358 m_toolTip.AddTool(
this, _T(
""));
359 m_toolTip.Activate(TRUE);
371 m_isShowCaretAlways =
true;
381 COLORREF r = m_textColor;
394 COLORREF r = m_backColor;
407 m_activeHighlightColor = activeColor;
408 m_inactiveHighlightColor = inactiveColor;
421 if ( _menu.GetSafeHmenu() != NULL )
426 r &= _menu.CreatePopupMenu();
429 r &= _menu.AppendMenu(MF_STRING | (canCopy ? 0 : MF_GRAYED), topMenuId + 0, _T(
"切り取り(&T)"));
430 r &= _menu.AppendMenu(MF_STRING | (canCopy ? 0 : MF_GRAYED), topMenuId + 1, _T(
"コピー(&C)"));
431 r &= _menu.AppendMenu(MF_STRING | (canPaste ? 0 : MF_GRAYED), topMenuId + 2, _T(
"貼り付け(&P)"));
446 ::ImmAssociateContext(_super::GetSafeHwnd(), NULL);
447 ::SetClassLong(_super::GetSafeHwnd(), GCL_HCURSOR,
reinterpret_cast<LONG
>(::LoadCursor(NULL, IDC_IBEAM)));
448 m_font.
Set(_super::GetSafeHwnd());
450 _super::PreSubclassWindow();
451 m_isEnableNotify =
true;
463 if ( ::IsWindow(m_toolTip) )
465 m_toolTip.RelayEvent(pMsg);
467 return _super::PreTranslateMessage(pMsg);
479 virtual LRESULT
WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
484 m_toolTip.DestroyWindow();
485 m_isEnableNotify =
false;
489 HFONT hFont =
reinterpret_cast<HFONT
>(wParam);
494 if ( LOWORD(lParam) != 0 )
502 m_DrawClient(CPaintDC(
this));
506 m_OnSetText(
reinterpret_cast<LPCTSTR
>(lParam));
509 case WM_GETTEXTLENGTH:
510 if ( m_dataString.GetLength() > 0 )
512 return (m_dataString.GetLength() - 1) *
sizeof(TCHAR);
517 if ( wParam > 0 && m_dataString.GetLength() > 0 )
519 LPTSTR pDst =
reinterpret_cast<TCHAR*
>(lParam);
520 LPCTSTR pSrc = m_dataString;
521 size_t n = m_dataString.GetLength() - 1;
522 size_t m = min(wParam, n);
528 return m *
sizeof(TCHAR);
544 return m_OnChar(wParam, lParam);
555 return m_OnMouse(message, wParam, lParam);
559 short d = HIWORD(wParam);
568 if ( IsWindowEnabled() )
570 HDC hdc =
reinterpret_cast<HDC
>(wParam);
573 CBrush b(m_backColor);
574 ::FillRect(hdc, &rect, b);
580 CWnd* pParent = GetParent();
581 if ( pParent != NULL )
585 ClientToScreen(rect);
586 pParent->ScreenToClient(rect);
587 pParent->InvalidateRect(rect, TRUE);
594 return DLGC_WANTCHARS | DLGC_WANTARROWS;
598 if ( m_selectCaretIndex >= 0 && m_caretIndex != m_selectCaretIndex )
601 int x1 = m_GetCaretIndex() / 2;
602 int x2 = m_selectCaretIndex / 2;
605 if ( message == WM_CUT )
607 m_DeleteSelectedData();
622 bool canCopy = (m_selectCaretIndex >= 0);
626 if ( po.x == -1 && po.y == -1 )
628 po = _super::GetCaretPos();
635 _super::ClientToScreen(&po);
636 po.y += m_charSize.cy;
639 TrackPopupMenuEx(menu, 0, po.x, po.y, _super::GetSafeHwnd(), NULL);
646 switch ( LOWORD(wParam) )
652 SendMessage(WM_COPY);
655 SendMessage(WM_PASTE);
663 return _super::WindowProc(message, wParam, lParam);
673 if ( m_isEnableNotify )
685 return IsWindowEnabled() ? m_textColor : ::GetSysColor(COLOR_GRAYTEXT);
694 return IsWindowEnabled() ? m_backColor : ::GetSysColor(COLOR_MENU);
701 _super::Invalidate();
705 void m_CheckCharSize(
void)
708 HGDIOBJ hOld = ::SelectObject(dc, m_font);
709 m_charSize = dc.GetTextExtent(_T(
"8"));
710 ::SelectObject(dc, hOld);
718 int m_GetIndexMax(
void)
const
728 void m_OnSetText(LPCTSTR lpsz)
741 if ( m_maxLength > 0 &&
ToInt(m_data.
GetSize()) > m_maxLength )
763 void m_SetCaretIndex(
int p,
bool isNotify =
true,
bool isCalcDrawPos =
false)
769 int im = m_GetIndexMax();
774 bool r = (m_caretIndex != p);
778 m_caretDrawPos.x = -1;
780 if ( isCalcDrawPos && m_caretDrawPos.x < 0 )
783 HGDIOBJ hOld = ::SelectObject(dc, m_font);
784 m_caretDrawPos = m_IndexToClientPoint(dc, m_caretIndex);
785 ::SelectObject(dc, hOld);
789 m_isCaletVisidle =
true;
798 int m_GetCaretIndex(
void)
const
810 LRESULT m_OnMouse(UINT message, WPARAM wParam, LPARAM lParam)
812 bool isCaptrued = (::GetCapture() == _super::GetSafeHwnd());
813 if ( message == WM_LBUTTONUP )
819 if ( m_selectCaretIndex == m_GetCaretIndex() )
827 if ( message == WM_MOUSEMOVE && ! isCaptrued )
833 HGDIOBJ hOld = ::SelectObject(dc, m_font);
834 int l = m_ClientPointToIndex(dc, po);
835 ::SelectObject(dc, hOld);
836 if ( message == WM_LBUTTONDOWN )
838 bool isShift = (::GetAsyncKeyState(VK_SHIFT) < 0);
839 if ( m_selectCaretIndex < 0 )
843 m_SetSelect(m_caretIndex, m_caretDrawPos);
844 ::SetCapture(_super::GetSafeHwnd());
855 m_SetCaretIndex(l,
true,
true);
858 CPoint spo = po - m_margin;
859 _super::ClientToScreen(&spo);
860 if ( ::DragDetect(m_hWnd, spo) )
863 m_SetSelect(m_caretIndex, m_caretDrawPos);
864 ::SetCapture(_super::GetSafeHwnd());
878 LRESULT m_OnChar(WPARAM wParam, LPARAM lParam)
880 if ( (lParam &
_BIT(31)) != 0 )
885 bool isShift = (::GetAsyncKeyState(VK_SHIFT) < 0);
886 bool isCtrl = (::GetAsyncKeyState(VK_CONTROL) < 0);
888 if ( isShift && wParam == VK_INSERT )
902 SendMessage(WM_COPY);
908 SendMessage(WM_PASTE);
915 m_Input(wParam, isShift);
924 void m_Input(WPARAM ch,
bool isShift)
927 bool isSendChange =
false;
928 int nowPosition = m_GetCaretIndex();
929 POINT nowDrawPos = m_caretDrawPos;
950 m_isInsertMode = ! m_isInsertMode;
955 POINT p = _super::GetCaretPos();
956 if ( m_isInsertMode )
958 _super::CreateSolidCaret(2, m_charSize.cy);
962 _super::CreateSolidCaret(m_charSize.cx, m_charSize.cy);
965 _super::SetCaretPos(p);
969 if ( ! m_DeleteSelectedData() )
971 int x = m_GetCaretIndex() / 2;
972 m_SetCaretIndex(x * 2);
984 if ( ! m_DeleteSelectedData() )
986 if ( m_GetCaretIndex() == 0 )
990 int x = (m_GetCaretIndex() - 1) / 2;
991 m_SetCaretIndex(x * 2);
1006 m_SetCaretIndex(m_GetIndexMax());
1011 int s = ((nowPosition & 1) == 0) ? 0 : 1;
1013 if ( ch == VK_PRIOR )
1017 int n = nowPosition + w + s;
1023 int s = ((nowPosition & 1) == 0) ? 0 : 1;
1024 int n = nowPosition - WIDTH * 2 - s;
1033 int s = ((nowPosition & 1) == 0) ? 0 : 1;
1034 int n = nowPosition + WIDTH * 2 + s;
1035 if ( n < m_GetIndexMax() )
1042 if ( ! isShift && m_selectCaretIndex >= 0 )
1045 if ( m_selectCaretIndex < nowPosition )
1050 if ( m_GetIndexMax() > nowPosition )
1052 int s = ((nowPosition & 1) == 0) ? 2 : 1;
1053 m_SetCaretIndex(nowPosition + s);
1057 if ( ! isShift && m_selectCaretIndex >= 0 )
1060 if ( m_selectCaretIndex > nowPosition )
1065 if ( nowPosition > 0 )
1067 int s = ((nowPosition & 1) == 0) ? 2 : 1;
1068 m_SetCaretIndex(nowPosition - s);
1079 if ( ch >= VK_NUMPAD0 && ch <= VK_NUMPAD9 )
1081 c = ch - VK_NUMPAD0;
1093 bool isDeleted = m_DeleteSelectedData();
1094 bool isLead = ((m_GetCaretIndex() & 1) == 0);
1095 INDEX x = m_GetCaretIndex() / 2;
1099 if ( m_maxLength > 0 && m_maxLength <=
ToInt(m_data.
GetSize()) )
1107 m_data[x] =
static_cast<BYTE
>(c << 4);
1109 isSendChange =
true;
1114 if ( m_isInsertMode || isDeleted )
1119 m_data.
Insert(x,
static_cast<BYTE
>(c << 4));
1121 isSendChange =
true;
1125 if ( m_maxLength > 0 && m_maxLength <=
ToInt(m_data.
GetSize()) )
1131 m_data.
Insert(x,
static_cast<BYTE
>(c << 4));
1133 isSendChange =
true;
1140 m_data[x] |=
static_cast<BYTE
>(c << 4);
1142 isSendChange =
true;
1148 m_data[x] |=
static_cast<BYTE
>(c);
1150 isSendChange =
true;
1152 m_SetCaretIndex(m_GetCaretIndex() + 1);
1159 if ( isShift && m_selectCaretIndex < 0 )
1161 m_SetSelect(nowPosition, nowDrawPos);
1163 if ( ! isShift && m_selectCaretIndex >= 0 )
1178 int m_ClientPointToIndex(CDC& dc,
const POINT& point)
1181 po = po - m_margin + m_viewPos;
1190 int w = (po.x) / m_charSize.cx;
1191 int h = (po.y) / m_charSize.cy;
1196 if ( w > WIDTH * 2 )
1200 return w + h * (WIDTH * 2);
1203 while ( m_dataString.GetLength() > w )
1205 if ( po.x < dc.GetTextExtent(m_dataString.Left(w + 1)).cx )
1212 if ( w > m_GetIndexMax() )
1214 w = m_GetIndexMax();
1220 CPoint m_IndexToClientPoint(CDC& dc,
int index)
1226 int x = index % (WIDTH * 2);
1227 pos.x = (x + (x / 2)) * m_charSize.cx;
1228 pos.y = (index / (WIDTH * 2)) * m_charSize.cy;
1229 if ( m_maxLength > 0 )
1232 if ( index == m_GetIndexMax() )
1234 pos.x = (WIDTH * 3) * m_charSize.cx;
1235 pos.y -= m_charSize.cy;
1242 int l = index + (index / 2);
1243 CPoint p = dc.GetTextExtent(m_dataString.Left(l));
1256 bool m_DeleteSelectedData(
void)
1258 if ( m_selectCaretIndex >= 0 && m_caretIndex != m_selectCaretIndex )
1260 int x1 = m_GetCaretIndex() / 2;
1261 int x2 = m_selectCaretIndex / 2;
1264 if ( m_GetCaretIndex() > m_selectCaretIndex )
1266 m_SetCaretIndex(m_selectCaretIndex);
1277 void m_MakeViewData(
void)
1287 dc.SetSize(m_maxLength - m_data.
GetSize());
1292 TCHAR* P = m_dataString.GetBuffer(m_data.
GetSize() * 3 + 1);
1301 m_dataString.ReleaseBuffer();
1302 if ( ::IsWindow(m_toolTip) )
1304 m_toolTip.UpdateTipText(
CStr::Fmt(_T(
"has %d byte(s)."), m_data.
GetSize()),
this);
1313 void m_DrawClient(CDC& dc)
1315 CPoint nowPos = m_viewPos;
1318 HGDIOBJ hOld = ::SelectObject(dc, m_font);
1319 dc.IntersectClipRect(rc);
1320 if ( m_caretDrawPos.x < 0 )
1322 m_caretDrawPos = m_IndexToClientPoint(dc, m_caretIndex);
1324 dc.SetBkMode(TRANSPARENT);
1327 m_DrawMultiLineMode(dc, rc);
1331 m_DrawSingleLineMode(dc, rc);
1333 ::SelectObject(dc, hOld);
1337 CPoint p = m_caretDrawPos - m_viewPos;
1338 if ( rc.PtInRect(p) && rc.PtInRect(p + m_charSize) )
1346 _super::SetCaretPos(p + m_margin);
1350 if ( m_isInsertMode )
1352 _super::CreateSolidCaret(2, m_charSize.cy);
1356 _super::CreateSolidCaret(m_charSize.cx, m_charSize.cy);
1358 _super::ShowCaret();
1359 _super::SetCaretPos(p + m_margin);
1362 if ( nowPos.x != m_viewPos.x )
1366 if ( nowPos.y != m_viewPos.y )
1377 void m_DrawMultiLineMode(CDC& targetDC,
const CRect& clientRect)
1379 CRect rc = clientRect;
1380 rc.left += m_margin.x;
1381 rc.top += m_margin.y;
1383 if ( m_isCaletVisidle )
1385 m_isCaletVisidle =
false;
1386 CPoint p = m_IndexToClientPoint(targetDC, m_caretIndex);
1387 if ( rc.Width() - m_charSize.cx < p.x - m_viewPos.x )
1389 m_viewPos.x = p.x - (rc.Width() - m_charSize.cx);
1391 if ( p.x < m_viewPos.x )
1395 int hh = rc.Height() / m_charSize.cy * m_charSize.cy;
1396 if ( hh - m_charSize.cy < p.y - m_viewPos.y )
1398 m_viewPos.y = p.y - (hh - m_charSize.cy);
1400 if ( p.y < m_viewPos.y )
1406 bi.
Set(clientRect.Width(), clientRect.Height(),
GetBkColor());
1411 dc.SetWindowOrg(m_viewPos);
1412 dca.SelectFont(m_font);
1416 rc.right += m_viewPos.x;
1417 rc.bottom = rc.top + m_charSize.cy;
1419 loop ( i, m_dataString.GetLength() / d + 1 )
1421 if ( dc.RectVisible(rc) )
1423 CString ss = m_dataString.Mid(i * d, d);
1424 dc.DrawText(ss, rc, DT_LEFT);
1426 rc.top += m_charSize.cy;
1427 rc.bottom += m_charSize.cy;
1430 bool hasFocus = m_HasFocus();
1431 if ( m_selectCaretIndex >= 0 && m_selectCaretIndex != m_caretIndex )
1433 POINT p1 = m_selectCaretDrawPos;
1434 POINT p2 = m_caretDrawPos;
1441 CRect rc(p1.x, p1.y, p2.x - m_charSize.cx, p1.y + m_charSize.cy);
1442 m_DrawSelectMark(dc, rc + m_margin, hasFocus);
1450 loop ( i, (p2.y - p1.y) / m_charSize.cy - 1 )
1452 CPoint ps(0, p1.y + (i + 1) * m_charSize.cy);
1453 CSize sz(m_charSize.cx * (WIDTH * 3 - 1), m_charSize.cy);
1454 m_DrawSelectMark(dc, CRect(ps, sz) + m_margin, hasFocus);
1456 CRect rc1(p1.x, p1.y, m_charSize.cx * (WIDTH * 3 - 1), p1.y + m_charSize.cy);
1457 m_DrawSelectMark(dc, rc1 + m_margin, hasFocus);
1458 CRect rc2(0, p2.y, p2.x - m_charSize.cx, p2.y + m_charSize.cy);
1459 m_DrawSelectMark(dc, rc2 + m_margin, hasFocus);
1462 else if ( m_isShowCaretAlways && ! hasFocus )
1464 CRect rc(m_caretDrawPos, m_charSize);
1465 if ( m_isInsertMode )
1467 rc.right = rc.left + 1;
1471 m_DrawSelectMark(dc, rc,
false);
1474 bi.
Draw(targetDC, 0, 0);
1482 void m_DrawSingleLineMode(CDC& dc,
const CRect& clientRect)
1484 CRect rc = clientRect;
1485 rc.left += m_margin.x;
1486 rc.top += m_margin.y;
1488 if ( m_isCaletVisidle )
1490 m_isCaletVisidle =
false;
1491 CPoint p = m_IndexToClientPoint(dc, m_caretIndex);
1492 if ( rc.Width() - m_charSize.cx < p.x - m_viewPos.x )
1494 m_viewPos.x = (p.x - (rc.Width() - m_charSize.cx));
1496 if ( p.x < m_viewPos.x )
1502 dc.SetWindowOrg(m_viewPos);
1504 rc.right += m_viewPos.x;
1507 dc.DrawText(m_dataString, rc, DT_LEFT);
1509 if ( m_selectCaretIndex >= 0 && m_selectCaretIndex != m_caretIndex )
1511 int x1 = m_selectCaretDrawPos.x;
1512 int x2 = m_caretDrawPos.x;
1517 CRect rc(x1, 0, x2 - m_charSize.cx + 2, m_charSize.cy);
1518 m_DrawSelectMark(dc, rc + m_margin);
1520 else if ( m_isShowCaretAlways && ! m_HasFocus() )
1522 CRect rc(m_caretDrawPos, m_charSize);
1523 if ( m_isInsertMode )
1525 rc.right = rc.left + 1;
1529 ::DrawFocusRect(dc, &rc);
1538 void m_DrawSelectMark(CDC& dc,
const CRect& rect,
bool isActive =
true)
1540 COLORREF color = isActive ? m_activeHighlightColor : m_inactiveHighlightColor;
1542 d.Draw(dc, rect.left, rect.top);
1545 void m_SetSelect(
int index,
const POINT& drawPos)
1547 m_selectCaretIndex = index;
1548 m_selectCaretDrawPos = drawPos;
1549 if ( (index & 1) != 0 )
1552 m_selectCaretIndex--;
1553 m_selectCaretDrawPos.x -= m_charSize.cx;
1557 void m_ReleaseSelect(
void)
1559 if ( m_selectCaretIndex >= 0 )
1561 m_selectCaretIndex = -1;
1565 void m_HideCaret(
void)
1568 _super::HideCaret();
1572 bool m_HasFocus(
void)
const
1574 return (::GetFocus() == _super::GetSafeHwnd());
1581 CToolTipCtrl m_toolTip;
1582 COLORREF m_textColor;
1583 COLORREF m_backColor;
1584 COLORREF m_activeHighlightColor;
1585 COLORREF m_inactiveHighlightColor;
1587 bool m_isInsertMode;
1589 bool m_isEnableNotify;
1592 CString m_dataString;
1596 CPoint m_caretDrawPos;
1597 int m_selectCaretIndex;
1598 CPoint m_selectCaretDrawPos;
1599 bool m_isShowCaretAlways;
1602 bool m_isCaletVisidle;
#define loop(VAR, CNT)
loop構文.
HWND GetSafeHwnd(void) const
[取得] ウィンドウハンドル取得.
bool Set(int cx, int cy, COLORREF color=CLR_INVALID)
[設定] イメージ設定.
bool Draw(HDC hdc, int x=0, int y=0) const
[処理] イメージ描画.
bool IsAvailable(UINT uFormat=0) const
[確認] 存在確認.
bool SetString(LPCTSTR lpszText, bool isAdd=false)
[設定] 文字列登録.
bool Set(const LOGFONT &attr)
[設定] フォント設定.
bool SetClone(HFONT hFont, double mul=1.0)
[設定] フォント設定.
static CStrT< TYP > BinaryToHexString(const IConstCollectionT< BYTE > &c)
[作成] バイナリ→HEX文字列
static CByteVector HexStringToBinary(const TYP *lpszHex)
[作成] HEX文字列→バイナリ
static CStrT Fmt(const TCHAR *lpszFormat,...)
[作成] 書式付き文字列作成
virtual size_t GetSize(void) const
[取得] サイズ取得
virtual bool Insert(INDEX index, const TYP &t)
[追加] 要素一つ挿入
virtual size_t RemoveElements(INDEX index, size_t size=0)
[削除] 要素削除.
virtual bool Remove(INDEX index)
[削除] 要素一つ削除.
virtual bool SetSize(size_t size)
[操作] サイズ指定
CVectorT< TYP > Mid(INDEX startIndex, size_t size=0) const
[作成] 切り出し
virtual size_t Append(const IConstCollectionT< TYP > &c)
[追加] 追加.
void SetHighlightColor(COLORREF activeColor, COLORREF inactiveColor)
[設定] ハイライト色設定.
void ReplaceSel(const CByteVector &vb)
[置換] データ置換.
void SetSel(int index)
[設定] 選択位置設定.
COLORREF GetTextColor(void) const
[取得] 文字色取得.
static bool MakeContextMenu(CMenu &_menu, bool canCopy, int topMenuId)
[作成] コンテキストメニュー作成.
const CByteVector & GetData(void) const
[取得] 入力データ取得.
COLORREF GetBkColor(void) const
[取得] 背景色取得.
bool AddToolTip(void)
[設定] ツールチップ追加.
bool IsInsertMode(void) const
[取得] インサートモード取得.
COLORREF SetBkColor(COLORREF color)
[設定] 背景色設定.
void SetLimitLength(int maxLength=-1, BYTE defaultData=0)
[設定] 最大長設定.
CEditHexDataT(void)
コンストラクタ.
int GetLineCount(void) const
[取得] 行数取得.
virtual void PreSubclassWindow(void)
[通知] subclassing/unsubclassing functions.
void SetMargins(const POINT &p)
[設定] マージン設定.
int GetVisibleLineCount(void) const
[取得] 可視行数取得.
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
[通知] for processing Windows messages.
virtual BOOL PreTranslateMessage(MSG *pMsg)
[通知] for translating Windows messages in main message pump
void SetData(const CByteVector &vb)
[設定] データ設定.
void GetSel(int &_startIndex, int &_endIndex) const
[取得] 選択位置取得.
bool IsMultiLineMode(void) const
[取得] マルチライン確認.
void SetFirstVisibleLine(int line)
[設定] 可視最上行設定.
int GetFirstVisibleLine(void) const
[取得] 可視最上行取得.
COLORREF SetTextColor(COLORREF color)
[設定] 文字色設定.
virtual void NotifyToParent(WORD notifyCode)
[通知] 親ウィンドウへ通知.
void SetInsertMode(bool isEnable)
[設定] インサートモード設定.
void ShowCaretAlways(void)
[設定] 常にカレット表示.
void SetSel(int startIndex, int endIndex)
[設定] 選択位置設定.
void ReplaceSel(LPCTSTR lpszText)
[置換] データ置換.
シングルラインHEXデータ入力Editコントロール
TNB::CVectorT< BYTE > CByteVector
BYTE配列管理クラス
LRESULT SendCommandMessage(CWnd *pCtrl, UINT cmd)
[処理] WM_COMMAND送信.
char IntToHexChar(int c)
[変換] 数値HEX文字変換
int HexCharToInt(int c)
[変換] HEX文字数値変換
int ToInt(LPCSTR lpsz, int iBase=10)
[変換] INT変換(ASCII/SJIS用).
void Swap(T &t1, T &t2)
[変換] スワッパー.