HexEditDlg.cpp
上传用户:szled88
上传日期:2015-04-09
资源大小:43957k
文件大小:15k
源码类别:

对话框与窗口

开发平台:

Visual C++

  1. // HexEditDlg.cpp : implementation file
  2. //
  3. // This file is a part of the XTREME TOOLKIT PRO MFC class library.
  4. // (c)1998-2008 Codejock Software, All Rights Reserved.
  5. //
  6. // THIS SOURCE FILE IS THE PROPERTY OF CODEJOCK SOFTWARE AND IS NOT TO BE
  7. // RE-DISTRIBUTED BY ANY MEANS WHATSOEVER WITHOUT THE EXPRESSED WRITTEN
  8. // CONSENT OF CODEJOCK SOFTWARE.
  9. //
  10. // THIS SOURCE CODE CAN ONLY BE USED UNDER THE TERMS AND CONDITIONS OUTLINED
  11. // IN THE XTREME TOOLKIT PRO LICENSE AGREEMENT. CODEJOCK SOFTWARE GRANTS TO
  12. // YOU (ONE SOFTWARE DEVELOPER) THE LIMITED RIGHT TO USE THIS SOFTWARE ON A
  13. // SINGLE COMPUTER.
  14. //
  15. // CONTACT INFORMATION:
  16. // support@codejock.com
  17. // http://www.codejock.com
  18. //
  19. /////////////////////////////////////////////////////////////////////////////
  20. #include "stdafx.h"
  21. #include "HexEdit.h"
  22. #include "HexEditDlg.h"
  23. #include "AboutDlg.h"
  24. #ifdef _DEBUG
  25. #define new DEBUG_NEW
  26. #undef THIS_FILE
  27. static char THIS_FILE[] = __FILE__;
  28. #endif
  29. /////////////////////////////////////////////////////////////////////////////
  30. // CHexEditDlg dialog
  31. CHexEditDlg::CHexEditDlg(CWnd* pParent /*=NULL*/)
  32. : CXTResizeDialog(CHexEditDlg::IDD, pParent)
  33. {
  34. //{{AFX_DATA_INIT(CHexEditDlg)
  35. m_bAddress = TRUE;
  36. m_bHex = TRUE;
  37. m_bASCII = TRUE;
  38. m_bWideAddress = TRUE;
  39. m_bEnable = TRUE;
  40. m_bCaret = TRUE;
  41. m_crBackEnabled = m_editHex.GetBackColor();
  42. m_crTextEnabled = m_editHex.GetTextColor();
  43. m_crBackHiliteEnabled = m_editHex.GetHighlightBackColor();
  44. m_crTextHiliteEnabled = m_editHex.GetHighlightTextColor();
  45. m_crBackDisabled = m_editHex.GetDisabledBackColor();
  46. m_crTextDisabled = m_editHex.GetDisabledTextColor();
  47. m_crBackHiliteDisabled = m_editHex.GetDisabledHighlightBackColor();
  48. m_crTextHiliteDisabled = m_editHex.GetDisabledHighlightTextColor();
  49. m_bAllowDel = TRUE;
  50. m_bReadOnly = FALSE;
  51. //}}AFX_DATA_INIT
  52. // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
  53. m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
  54. m_pData = (LPBYTE) // don't use _T()
  55. "This is some test data for CXTHexEdit without any special meaning. "
  56. "You can type 10 characters past the end.";
  57. }
  58. void CHexEditDlg::DoDataExchange(CDataExchange* pDX)
  59. {
  60. CXTResizeDialog::DoDataExchange(pDX);
  61. //{{AFX_DATA_MAP(CHexEditDlg)
  62. DDX_Control(pDX, IDC_CLR_TEXT_HILITE_DISABLED, m_cpTextHiliteDisabled);
  63. DDX_Control(pDX, IDC_CLR_BACK_HILITE_DISABLED, m_cpBackHiliteDisabled);
  64. DDX_Control(pDX, IDC_CLR_TEXT_DISABLED, m_cpTextEnabledDisabled);
  65. DDX_Control(pDX, IDC_CLR_BACK_DISABLED, m_cpBackEnabledDisabled);
  66. DDX_Control(pDX, IDC_CLR_TEXT_HILITE_ENABLED, m_cpTextHiliteEnabled);
  67. DDX_Control(pDX, IDC_CLR_BACK_HILITE_ENABLED, m_cpBackHiliteEnabled);
  68. DDX_Control(pDX, IDC_CLR_TEXT_ENABLED, m_cpTextEnabled);
  69. DDX_Control(pDX, IDC_CLR_BACK_ENABLED, m_cpBackEnabled);
  70. DDX_Control(pDX, IDC_EDIT_BASEADDR, m_editBaseAddress);
  71. DDX_Control(pDX, IDC_SLIDER, m_slider);
  72. DDX_Control(pDX, IDC_HEXEDIT, m_editHex);
  73. DDX_Control(pDX, IDC_TXT_ENABLED, m_txtEnabled);
  74. DDX_Control(pDX, IDC_TXT_DISABLED, m_txtDisabled);
  75. DDX_Check(pDX, IDC_CHK_ADDRESS, m_bAddress);
  76. DDX_Check(pDX, IDC_CHK_HEXCODE, m_bHex);
  77. DDX_Check(pDX, IDC_CHK_ASCII, m_bASCII);
  78. DDX_Check(pDX, IDC_CHK_WIDE_ADDRESS, m_bWideAddress);
  79. DDX_Check(pDX, IDC_CHK_ENABLE, m_bEnable);
  80. DDX_Check(pDX, IDC_CHK_CARET, m_bCaret);
  81. DDX_XTColorPicker(pDX, IDC_CLR_BACK_ENABLED, m_crBackEnabled);
  82. DDX_XTColorPicker(pDX, IDC_CLR_TEXT_ENABLED, m_crTextEnabled);
  83. DDX_XTColorPicker(pDX, IDC_CLR_BACK_HILITE_ENABLED, m_crBackHiliteEnabled);
  84. DDX_XTColorPicker(pDX, IDC_CLR_TEXT_HILITE_ENABLED, m_crTextHiliteEnabled);
  85. DDX_XTColorPicker(pDX, IDC_CLR_BACK_DISABLED, m_crBackDisabled);
  86. DDX_XTColorPicker(pDX, IDC_CLR_TEXT_DISABLED, m_crTextDisabled);
  87. DDX_XTColorPicker(pDX, IDC_CLR_BACK_HILITE_DISABLED, m_crBackHiliteDisabled);
  88. DDX_XTColorPicker(pDX, IDC_CLR_TEXT_HILITE_DISABLED, m_crTextHiliteDisabled);
  89. DDX_Check(pDX, IDC_CHK_ALLOWDEL, m_bAllowDel);
  90. DDX_Check(pDX, IDC_CHK_READONLY, m_bReadOnly);
  91. //}}AFX_DATA_MAP
  92. }
  93. BEGIN_MESSAGE_MAP(CHexEditDlg, CXTResizeDialog)
  94. //{{AFX_MSG_MAP(CHexEditDlg)
  95. ON_WM_SYSCOMMAND()
  96. ON_WM_PAINT()
  97. ON_WM_QUERYDRAGICON()
  98. ON_BN_CLICKED(IDC_CHK_ADDRESS, OnChkAddress)
  99. ON_BN_CLICKED(IDC_CHK_HEXCODE, OnChkHexCode)
  100. ON_BN_CLICKED(IDC_CHK_ASCII, OnChkAscii)
  101. ON_BN_CLICKED(IDC_CHK_WIDE_ADDRESS, OnChkWideAddress)
  102. ON_WM_HSCROLL()
  103. ON_EN_CHANGE(IDC_EDIT_BASEADDR, OnChangeBaseAddress)
  104. ON_BN_CLICKED(IDC_CHK_ENABLE, OnEnable)
  105. ON_CPN_XT_SELENDOK(IDC_CLR_BACK_ENABLED, OnClrBackEnabled)
  106. ON_CPN_XT_SELENDOK(IDC_CLR_TEXT_ENABLED, OnClrTextEnabled)
  107. ON_CPN_XT_SELENDOK(IDC_CLR_BACK_HILITE_ENABLED, OnClrBackHiliteEnabled)
  108. ON_CPN_XT_SELENDOK(IDC_CLR_TEXT_HILITE_ENABLED, OnClrTextHiliteEnabled)
  109. ON_CPN_XT_SELENDOK(IDC_CLR_BACK_DISABLED, OnClrBackDisabled)
  110. ON_CPN_XT_SELENDOK(IDC_CLR_TEXT_DISABLED, OnClrTextDisabled)
  111. ON_CPN_XT_SELENDOK(IDC_CLR_BACK_HILITE_DISABLED, OnClrBackHiliteDisabled)
  112. ON_CPN_XT_SELENDOK(IDC_CLR_TEXT_HILITE_DISABLED, OnClrTextHiliteDisabled)
  113. ON_BN_CLICKED(IDC_CHK_CARET, OnChkCaret)
  114. ON_WM_DESTROY()
  115. ON_BN_CLICKED(IDC_CHK_ALLOWDEL, OnChkAllowdel)
  116. ON_BN_CLICKED(IDC_CHK_READONLY, OnChkReadonly)
  117. //}}AFX_MSG_MAP
  118. END_MESSAGE_MAP()
  119. /////////////////////////////////////////////////////////////////////////////
  120. // CHexEditDlg message handlers
  121. BOOL CHexEditDlg::OnInitDialog()
  122. {
  123. CXTResizeDialog::OnInitDialog();
  124. // Add "About..." menu item to system menu.
  125. // IDM_ABOUTBOX must be in the system command range.
  126. ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
  127. ASSERT(IDM_ABOUTBOX < 0xF000);
  128. CMenu* pSysMenu = GetSystemMenu(FALSE);
  129. if (pSysMenu != NULL)
  130. {
  131. CString strAboutMenu;
  132. strAboutMenu.LoadString(IDS_ABOUTBOX);
  133. if (!strAboutMenu.IsEmpty())
  134. {
  135. pSysMenu->AppendMenu(MF_SEPARATOR);
  136. pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
  137. }
  138. }
  139. // Set the icon for this dialog.  The framework does this automatically
  140. //  when the application's main window is not a dialog
  141. SetIcon(m_hIcon, TRUE);         // Set big icon
  142. SetIcon(m_hIcon, FALSE);        // Set small icon
  143. // TODO: Add extra initialization here
  144. m_slider.SetRange(1, 16);
  145. m_slider.SetPos(8);
  146. m_editHex.SetBPR(8);
  147. const int len = (int)strlen((char *)m_pData);
  148. m_editHex.SetData(m_pData, len, len + 10);
  149. m_editBaseAddress.SetEditMask(_T("0xHHHHHHHH"), _T("0x________"), _T("0x00000000"));
  150. m_cpBackEnabled.SetColor(m_crBackEnabled);
  151. m_cpBackEnabled.SetDefaultColor(m_crBackEnabled);
  152. m_cpTextEnabled.SetColor(m_crTextEnabled);
  153. m_cpTextEnabled.SetDefaultColor(m_crTextEnabled);
  154. m_cpBackHiliteEnabled.SetColor(m_crBackHiliteEnabled);
  155. m_cpBackHiliteEnabled.SetDefaultColor(m_crBackHiliteEnabled);
  156. m_cpTextHiliteEnabled.SetColor(m_crTextHiliteEnabled);
  157. m_cpTextHiliteEnabled.SetDefaultColor(m_crTextHiliteEnabled);
  158. m_cpBackEnabledDisabled.SetColor(m_crBackDisabled);
  159. m_cpBackEnabledDisabled.SetDefaultColor(m_crBackDisabled);
  160. m_cpTextEnabledDisabled.SetColor(m_crTextDisabled);
  161. m_cpTextEnabledDisabled.SetDefaultColor(m_crTextDisabled);
  162. m_cpBackHiliteDisabled.SetColor(m_crBackHiliteDisabled);
  163. m_cpBackHiliteDisabled.SetDefaultColor(m_crBackHiliteDisabled);
  164. m_cpTextHiliteDisabled.SetColor(m_crTextHiliteDisabled);
  165. m_cpTextHiliteDisabled.SetDefaultColor(m_crTextHiliteDisabled);
  166. // set the font for the separators
  167. m_txtEnabled.SetFont(&XTAuxData().fontBold);
  168. m_txtDisabled.SetFont(&XTAuxData().fontBold);
  169. // Set control resizing.
  170. SetResize(IDC_HEXEDIT,                  SZ_TOP_LEFT,    SZ_BOTTOM_RIGHT);
  171. SetResize(IDOK,                         SZ_TOP_RIGHT,   SZ_TOP_RIGHT);
  172. SetResize(IDCANCEL,                     SZ_TOP_RIGHT,   SZ_TOP_RIGHT);
  173. SetResize(IDC_TXT_BASEADDR,             SZ_TOP_RIGHT,   SZ_TOP_RIGHT);
  174. SetResize(IDC_EDIT_BASEADDR,            SZ_TOP_RIGHT,   SZ_TOP_RIGHT);
  175. SetResize(IDC_CHK_ADDRESS,              SZ_TOP_RIGHT,   SZ_TOP_RIGHT);
  176. SetResize(IDC_CHK_HEXCODE,              SZ_TOP_RIGHT,   SZ_TOP_RIGHT);
  177. SetResize(IDC_CHK_ASCII,                SZ_TOP_RIGHT,   SZ_TOP_RIGHT);
  178. SetResize(IDC_CHK_WIDE_ADDRESS,         SZ_TOP_RIGHT,   SZ_TOP_RIGHT);
  179. SetResize(IDC_TXT_BYTE,                 SZ_TOP_RIGHT,   SZ_TOP_RIGHT);
  180. SetResize(IDC_SLIDER,                   SZ_TOP_RIGHT,   SZ_TOP_RIGHT);
  181. SetResize(IDC_CHK_ENABLE,               SZ_TOP_RIGHT,   SZ_TOP_RIGHT);
  182. SetResize(IDC_CHK_CARET,                SZ_TOP_RIGHT,   SZ_TOP_RIGHT);
  183. SetResize(IDC_CHK_READONLY,             SZ_TOP_RIGHT,   SZ_TOP_RIGHT);
  184. SetResize(IDC_CHK_ALLOWDEL,             SZ_TOP_RIGHT,   SZ_TOP_RIGHT);
  185. SetResize(IDC_TXT_ENABLED,              SZ_BOTTOM_LEFT, SZ_BOTTOM_LEFT);
  186. SetResize(IDC_TXT_DISABLED,             SZ_BOTTOM_LEFT, SZ_BOTTOM_LEFT);
  187. SetResize(IDC_TXT_BACK_ENABLED,         SZ_BOTTOM_LEFT, SZ_BOTTOM_LEFT);
  188. SetResize(IDC_CLR_BACK_ENABLED,         SZ_BOTTOM_LEFT, SZ_BOTTOM_LEFT);
  189. SetResize(IDC_TXT_TEXT_ENABLED,         SZ_BOTTOM_LEFT, SZ_BOTTOM_LEFT);
  190. SetResize(IDC_CLR_TEXT_ENABLED,         SZ_BOTTOM_LEFT, SZ_BOTTOM_LEFT);
  191. SetResize(IDC_TXT_BACK_HILITE_ENABLED,  SZ_BOTTOM_LEFT, SZ_BOTTOM_LEFT);
  192. SetResize(IDC_CLR_BACK_HILITE_ENABLED,  SZ_BOTTOM_LEFT, SZ_BOTTOM_LEFT);
  193. SetResize(IDC_TXT_TEXT_HILITE_ENABLED,  SZ_BOTTOM_LEFT, SZ_BOTTOM_LEFT);
  194. SetResize(IDC_CLR_TEXT_HILITE_ENABLED,  SZ_BOTTOM_LEFT, SZ_BOTTOM_LEFT);
  195. SetResize(IDC_TXT_BACK_DISABLED,        SZ_BOTTOM_LEFT, SZ_BOTTOM_LEFT);
  196. SetResize(IDC_CLR_BACK_DISABLED,        SZ_BOTTOM_LEFT, SZ_BOTTOM_LEFT);
  197. SetResize(IDC_TXT_TEXT_DISABLED,        SZ_BOTTOM_LEFT, SZ_BOTTOM_LEFT);
  198. SetResize(IDC_CLR_TEXT_DISABLED,        SZ_BOTTOM_LEFT, SZ_BOTTOM_LEFT);
  199. SetResize(IDC_TXT_BACK_HILITE_DISABLED, SZ_BOTTOM_LEFT, SZ_BOTTOM_LEFT);
  200. SetResize(IDC_CLR_BACK_HILITE_DISABLED, SZ_BOTTOM_LEFT, SZ_BOTTOM_LEFT);
  201. SetResize(IDC_TXT_TEXT_HILITE_DISABLED, SZ_BOTTOM_LEFT, SZ_BOTTOM_LEFT);
  202. SetResize(IDC_CLR_TEXT_HILITE_DISABLED, SZ_BOTTOM_LEFT, SZ_BOTTOM_LEFT);
  203. SetResize(IDC_GBOX_ENABLED,             SZ_BOTTOM_LEFT, SZ_BOTTOM_RIGHT);
  204. SetResize(IDC_GBOX_DISABLED,            SZ_BOTTOM_LEFT, SZ_BOTTOM_RIGHT);
  205. // Load window placement
  206. LoadPlacement(_T("CHexEditDlg"));
  207. // Enable Office XP themes.
  208. XTThemeManager()->SetTheme(xtThemeOfficeXP);
  209. CXTPPaintManager::SetTheme(xtpThemeOfficeXP);
  210. return TRUE;  // return TRUE  unless you set the focus to a control
  211. }
  212. void CHexEditDlg::OnDestroy()
  213. {
  214. // Save window placement
  215. SavePlacement(_T("CHexEditDlg"));
  216. CXTResizeDialog::OnDestroy();
  217. }
  218. void CHexEditDlg::OnSysCommand(UINT nID, LPARAM lParam)
  219. {
  220. if ((nID & 0xFFF0) == IDM_ABOUTBOX)
  221. {
  222. CAboutDlg dlgAbout;
  223. dlgAbout.DoModal();
  224. }
  225. else
  226. {
  227. CXTResizeDialog::OnSysCommand(nID, lParam);
  228. }
  229. }
  230. // If you add a minimize button to your dialog, you will need the code below
  231. //  to draw the icon.  For MFC applications using the document/view model,
  232. //  this is automatically done for you by the framework.
  233. void CHexEditDlg::OnPaint()
  234. {
  235. if (IsIconic())
  236. {
  237. CPaintDC dc(this); // device context for painting
  238. SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
  239. // Center icon in client rectangle
  240. int cxIcon = GetSystemMetrics(SM_CXICON);
  241. int cyIcon = GetSystemMetrics(SM_CYICON);
  242. CRect rect;
  243. GetClientRect(&rect);
  244. int x = (rect.Width() - cxIcon + 1) / 2;
  245. int y = (rect.Height() - cyIcon + 1) / 2;
  246. // Draw the icon
  247. dc.DrawIcon(x, y, m_hIcon);
  248. }
  249. else
  250. {
  251. CXTResizeDialog::OnPaint();
  252. }
  253. }
  254. // The system calls this to obtain the cursor to display while the user drags
  255. //  the minimized window.
  256. HCURSOR CHexEditDlg::OnQueryDragIcon()
  257. {
  258. return (HCURSOR) m_hIcon;
  259. }
  260. void CHexEditDlg::OnChkAddress()
  261. {
  262. UpdateData(TRUE);
  263. m_editHex.SetOptions(m_bAddress, m_bHex, m_bASCII, m_bWideAddress);
  264. m_editHex.RedrawWindow();
  265. }
  266. void CHexEditDlg::OnChkHexCode()
  267. {
  268. UpdateData(TRUE);
  269. m_editHex.SetOptions(m_bAddress, m_bHex, m_bASCII, m_bWideAddress);
  270. m_editHex.RedrawWindow();
  271. }
  272. void CHexEditDlg::OnChkAscii()
  273. {
  274. UpdateData(TRUE);
  275. m_editHex.SetOptions(m_bAddress, m_bHex, m_bASCII, m_bWideAddress);
  276. m_editHex.RedrawWindow();
  277. }
  278. void CHexEditDlg::OnChkWideAddress()
  279. {
  280. UpdateData(TRUE);
  281. m_editHex.SetOptions(m_bAddress, m_bHex, m_bASCII, m_bWideAddress);
  282. m_editHex.RedrawWindow();
  283. }
  284. void CHexEditDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
  285. {
  286. // TODO: Add your message handler code here and/or call default
  287. m_editHex.SetBPR(m_slider.GetPos());
  288. m_editHex.ModifyStyle(WS_HSCROLL,
  289. (m_slider.GetPos() > 8)? WS_HSCROLL : 0);
  290. m_editHex.SendMessage(WM_VSCROLL, MAKEWPARAM(HIWORD(SB_THUMBTRACK),LOWORD(0)), NULL);
  291. m_editHex.RedrawWindow();
  292. CXTResizeDialog::OnHScroll(nSBCode, nPos, pScrollBar);
  293. }
  294. void CHexEditDlg::OnChangeBaseAddress()
  295. {
  296. UpdateData(TRUE);
  297. CString cs;
  298. DWORD dwAddress;
  299. m_editBaseAddress.GetWindowText(cs);
  300. SCANF_S((LPCTSTR)cs, _T("%lx"), &dwAddress);
  301. m_editHex.SetAddressBase(dwAddress);
  302. m_editHex.RedrawWindow();
  303. }
  304. void CHexEditDlg::OnEnable()
  305. {
  306. UpdateData();
  307. m_editHex.EnableWindow(m_bEnable);
  308. }
  309. void CHexEditDlg::OnClrBackEnabled()
  310. {
  311. UpdateData();
  312. m_editHex.SetBackColor(m_crBackEnabled);
  313. m_editHex.Invalidate();
  314. m_editHex.UpdateWindow();
  315. }
  316. void CHexEditDlg::OnClrTextEnabled()
  317. {
  318. UpdateData();
  319. m_editHex.SetTextColor(m_crTextEnabled);
  320. m_editHex.Invalidate();
  321. m_editHex.UpdateWindow();
  322. }
  323. void CHexEditDlg::OnClrBackHiliteEnabled()
  324. {
  325. UpdateData();
  326. m_editHex.SetHighlightBackColor(m_crBackHiliteEnabled);
  327. m_editHex.Invalidate();
  328. m_editHex.UpdateWindow();
  329. }
  330. void CHexEditDlg::OnClrTextHiliteEnabled()
  331. {
  332. UpdateData();
  333. m_editHex.SetHighlightTextColor(m_crTextHiliteEnabled);
  334. m_editHex.Invalidate();
  335. m_editHex.UpdateWindow();
  336. }
  337. void CHexEditDlg::OnClrBackDisabled()
  338. {
  339. UpdateData();
  340. m_editHex.SetDisabledBackColor(m_crBackDisabled);
  341. m_editHex.Invalidate();
  342. m_editHex.UpdateWindow();
  343. }
  344. void CHexEditDlg::OnClrTextDisabled()
  345. {
  346. UpdateData();
  347. m_editHex.SetDisabledTextColor(m_crTextDisabled);
  348. m_editHex.Invalidate();
  349. m_editHex.UpdateWindow();
  350. }
  351. void CHexEditDlg::OnClrBackHiliteDisabled()
  352. {
  353. UpdateData();
  354. m_editHex.SetDisabledHighlightBackColor(m_crBackHiliteDisabled);
  355. m_editHex.Invalidate();
  356. m_editHex.UpdateWindow();
  357. }
  358. void CHexEditDlg::OnClrTextHiliteDisabled()
  359. {
  360. UpdateData();
  361. m_editHex.SetDisabledHighlightTextColor(m_crTextHiliteDisabled);
  362. m_editHex.Invalidate();
  363. m_editHex.UpdateWindow();
  364. }
  365. void CHexEditDlg::OnChkCaret()
  366. {
  367. UpdateData();
  368. m_editHex.EnableCaret(m_bCaret ? true : false);
  369. }
  370. void CHexEditDlg::OnChkAllowdel()
  371. {
  372. UpdateData();
  373. m_editHex.SetAllowDeletes(m_bAllowDel == TRUE);
  374. }
  375. void CHexEditDlg::OnChkReadonly()
  376. {
  377. UpdateData();
  378. m_editHex.ModifyStyle( m_bReadOnly ? 0 :ES_READONLY,
  379. m_bReadOnly ? ES_READONLY : 0 );
  380. m_editHex.Invalidate();
  381. m_editHex.UpdateWindow();
  382. }