Skip to content

Commit

Permalink
CHexDlgBkmMgr is now MFC free.
Browse files Browse the repository at this point in the history
  • Loading branch information
jovibor committed Dec 23, 2024
1 parent e0cee8f commit 7da7ed1
Show file tree
Hide file tree
Showing 12 changed files with 197 additions and 163 deletions.
8 changes: 2 additions & 6 deletions HexCtrl/res/HexCtrl.rc
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,7 @@ END

IDD_HEXCTRL_BKMMGR AFX_DIALOG_LAYOUT
BEGIN
0,
0, 0, 100, 100,
0, 100, 0, 0
0
END

IDD_HEXCTRL_GOTO AFX_DIALOG_LAYOUT
Expand Down Expand Up @@ -523,9 +521,7 @@ END

IDD_HEXCTRL_CODEPAGE AFX_DIALOG_LAYOUT
BEGIN
0,
0, 0, 100, 100,
0, 0, 0, 0
0
END

IDD_HEXCTRL_MODIFY AFX_DIALOG_LAYOUT
Expand Down
9 changes: 4 additions & 5 deletions HexCtrl/src/CHexCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ auto CHexDlgAbout::OnCommand(const MSG& stMsg)->INT_PTR {

auto CHexDlgAbout::OnCtlClrStatic(const MSG& stMsg)->INT_PTR
{
const auto hWndFrom = reinterpret_cast<HWND>(stMsg.lParam);
if (hWndFrom == m_WndLink) {
if (const auto hWndFrom = reinterpret_cast<HWND>(stMsg.lParam); hWndFrom == m_WndLink) {
const auto hDC = reinterpret_cast<HDC>(stMsg.wParam);
::SetTextColor(hDC, RGB(0, 50, 250));
::SetBkColor(hDC, ::GetSysColor(COLOR_3DFACE));
Expand Down Expand Up @@ -980,10 +979,10 @@ auto CHexCtrl::GetWndHandle(EHexWnd eWnd, bool fCreate)const->HWND
case EHexWnd::WND_MAIN:
return m_hWnd;
case EHexWnd::DLG_BKMMGR:
if (!IsWindow(m_pDlgBkmMgr->m_hWnd) && fCreate) {
m_pDlgBkmMgr->Create(IDD_HEXCTRL_BKMMGR, CWnd::FromHandle(m_hWnd));
if (!IsWindow(m_pDlgBkmMgr->GetHWND()) && fCreate) {
m_pDlgBkmMgr->CreateDlg();
}
return m_pDlgBkmMgr->m_hWnd;
return m_pDlgBkmMgr->GetHWND();
case EHexWnd::DLG_DATAINTERP:
if (!IsWindow(m_pDlgDataInterp->m_hWnd) && fCreate) {
m_pDlgDataInterp->Create(IDD_HEXCTRL_DATAINTERP, CWnd::FromHandle(m_hWnd));
Expand Down
2 changes: 0 additions & 2 deletions HexCtrl/src/CHexScroll.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -993,8 +993,6 @@ auto CHexScroll::OnDestroy(const MSG& stMsg)->LRESULT
::DeleteObject(m_hBmpArrowLast);
m_hBmpArrowFirst = nullptr;
m_hBmpArrowLast = nullptr;
m_Wnd.Detach();
m_WndParent.Detach();
m_fCreated = false;

return wnd::DefMsgProc(stMsg);
Expand Down
Loading

0 comments on commit 7da7ed1

Please sign in to comment.