Skip to content

Commit

Permalink
1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zbeboy committed Oct 21, 2017
1 parent 2efb3de commit 2072aa9
Show file tree
Hide file tree
Showing 23 changed files with 1,539 additions and 514 deletions.
Binary file modified .vs/Jsonviewer/v15/.suo
Binary file not shown.
Binary file modified .vs/Jsonviewer/v15/Browse.VC.db
Binary file not shown.
Binary file not shown.
Binary file modified .vs/Jsonviewer2/v15/.suo
Binary file not shown.
Binary file modified .vs/Jsonviewer2/v15/Browse.VC.db
Binary file not shown.
Binary file modified .vs/slnx.sqlite
Binary file not shown.
2 changes: 1 addition & 1 deletion DockingDlgInterface.h
Expand Up @@ -72,7 +72,7 @@ class DockingDlgInterface : public StaticDialog
};

protected :
virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam)
virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM /*wParam*/, LPARAM lParam)
{
switch (message)
{
Expand Down
20 changes: 10 additions & 10 deletions Hyperlinks.cpp
Expand Up @@ -40,7 +40,7 @@ LRESULT CALLBACK _HyperlinkParentProc(HWND hwnd, UINT message, WPARAM wParam, LP
}
case WM_DESTROY:
{
SetWindowLong(hwnd, GWLP_WNDPROC, (LONG) pfnOrigProc);
SetWindowLongPtr(hwnd, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(pfnOrigProc));
RemoveProp(hwnd, PROP_ORIGINAL_PROC);
break;
}
Expand All @@ -56,7 +56,7 @@ LRESULT CALLBACK _HyperlinkProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM l
{
case WM_DESTROY:
{
SetWindowLong(hwnd, GWLP_WNDPROC, (LONG) pfnOrigProc);
SetWindowLongPtr(hwnd, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(pfnOrigProc));
RemoveProp(hwnd, PROP_ORIGINAL_PROC);

HFONT hOrigFont = (HFONT) GetProp(hwnd, PROP_ORIGINAL_FONT);
Expand Down Expand Up @@ -102,10 +102,10 @@ LRESULT CALLBACK _HyperlinkProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM l
{
// Since IDC_HAND is not available on all operating systems,
// we will load the arrow cursor if IDC_HAND is not present.
HCURSOR hCursor = LoadCursor(NULL, MAKEINTRESOURCE(IDC_HAND));
HCURSOR hCursor = LoadCursor(NULL, IDC_HAND);
if (NULL == hCursor)
{
hCursor = LoadCursor(NULL, MAKEINTRESOURCE(IDC_ARROW));
hCursor = LoadCursor(NULL, IDC_ARROW);
}
SetCursor(hCursor);
return TRUE;
Expand All @@ -122,24 +122,24 @@ BOOL ConvertStaticToHyperlink(HWND hwndCtl)
HWND hwndParent = GetParent(hwndCtl);
if (NULL != hwndParent)
{
WNDPROC pfnOrigProc = (WNDPROC) GetWindowLong(hwndParent, GWLP_WNDPROC);
WNDPROC pfnOrigProc = (WNDPROC) GetWindowLongPtr(hwndParent, GWLP_WNDPROC);
if (pfnOrigProc != _HyperlinkParentProc)
{
SetProp(hwndParent, PROP_ORIGINAL_PROC, (HANDLE) pfnOrigProc);
SetWindowLong(hwndParent, GWLP_WNDPROC, (LONG) (WNDPROC) _HyperlinkParentProc);
SetWindowLongPtr(hwndParent, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(_HyperlinkParentProc));
}
}

// Make sure the control will send notifications.

DWORD dwStyle = GetWindowLong(hwndCtl, GWL_STYLE);
SetWindowLong(hwndCtl, GWL_STYLE, dwStyle | SS_NOTIFY);
LONG_PTR dwStyle = GetWindowLongPtr(hwndCtl, GWL_STYLE);
SetWindowLongPtr(hwndCtl, GWL_STYLE, dwStyle | SS_NOTIFY);

// Subclass the existing control.

WNDPROC pfnOrigProc = (WNDPROC) GetWindowLong(hwndCtl, GWLP_WNDPROC);
WNDPROC pfnOrigProc = (WNDPROC)GetWindowLongPtr(hwndCtl, GWLP_WNDPROC);
SetProp(hwndCtl, PROP_ORIGINAL_PROC, (HANDLE) pfnOrigProc);
SetWindowLong(hwndCtl, GWLP_WNDPROC, (LONG) (WNDPROC) _HyperlinkProc);
SetWindowLongPtr(hwndCtl, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(_HyperlinkProc));

// Create an updated font by adding an underline.

Expand Down

0 comments on commit 2072aa9

Please sign in to comment.