Skip to content
  • Sponsor
  • Notifications You must be signed in to change notification settings
  • Fork 2
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: katahiromz/LineNumEdit
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4f59b781ef9fcf076967d0f89f2f907c17b77826
Choose a base ref
...
head repository: katahiromz/LineNumEdit
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 213cce8999895e1e69084df24655fc4089105359
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Jun 12, 2021

  1. Copy the full SHA
    213cce8 View commit details
Showing with 4 additions and 2 deletions.
  1. +4 −2 LineNumEdit.hpp
6 changes: 4 additions & 2 deletions LineNumEdit.hpp
Original file line number Diff line number Diff line change
@@ -78,15 +78,17 @@ class LineNumBase
{
assert(m_hwnd == NULL);
SetWindowLongPtr(hwnd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(this));
m_fnOldWndProc = SubclassWindow(hwnd, LineNumBase::WindowProc);
m_fnOldWndProc =
reinterpret_cast<WNDPROC>(SetWindowLongPtr(hwnd, GWLP_WNDPROC,
reinterpret_cast<LONG_PTR>(LineNumBase::WindowProc)));
m_hwnd = hwnd;
return TRUE;
}

HWND Detach()
{
SetWindowLongPtr(m_hwnd, GWLP_USERDATA, 0);
SubclassWindow(m_hwnd, m_fnOldWndProc);
SetWindowLongPtr(m_hwnd, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(m_fnOldWndProc));
m_fnOldWndProc = NULL;
HWND hwnd = m_hwnd;
m_hwnd = NULL;