Rev 5 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 5 | Rev 21 | ||
|---|---|---|---|
| Line 127... | Line 127... | ||
| 127 | { |
127 | { |
| 128 | result = CallWindowProc (hyperlinkparent->pfnOrigProc, hWnd, message, wParam, lParam); // call the window procedure normally |
128 | result = CallWindowProc (hyperlinkparent->pfnOrigProc, hWnd, message, wParam, lParam); // call the window procedure normally |
| 129 | if ((WNDPROC) GetWindowLong ((HWND) lParam, GWL_WNDPROC) == (WNDPROC) _HyperlinkProc) |
129 | if ((WNDPROC) GetWindowLong ((HWND) lParam, GWL_WNDPROC) == (WNDPROC) _HyperlinkProc) |
| 130 | SetTextColor ((HDC) wParam, RGB (0, 0, 192)); // but notify the parent to draw this text in blue if it's one of our hyperlinks |
130 | SetTextColor ((HDC) wParam, RGB (0, 0, 192)); // but notify the parent to draw this text in blue if it's one of our hyperlinks |
| 131 | return (result); // and return the original window proc return result |
131 | return (result); // and return the original window proc return result |
| 132 | } |
- | |
| 133 | - | ||
| 134 | // else are we destroying ourselves ? |
- | |
| 135 | else if (message == WM_DESTROY) |
- | |
| 136 | { |
- | |
| 137 | if (hyperlinkparent != NULL) |
- | |
| 138 | { |
- | |
| 139 | SetWindowLongPtr (hWnd, GWL_WNDPROC, (long) hyperlinkparent->pfnOrigProc); // restore the original window procedure |
- | |
| 140 | RemoveProp (hWnd, PROP_HYPERLINKPARENT_STRUCT); // and remove the window property where we used to save it |
- | |
| 141 | free (hyperlinkparent); // free the hyperlink parent structure |
- | |
| 142 | hyperlinkparent = NULL; |
- | |
| 143 | } |
- | |
| 144 | - | ||
| 145 | return (DefWindowProc (hWnd, message, wParam, lParam)); // consistency fallback |
- | |
| 146 | } |
132 | } |
| 147 | 133 | ||
| 148 | // now call the original window procedure to let things go normally |
134 | // now call the original window procedure to let things go normally |
| 149 | return (CallWindowProc (hyperlinkparent->pfnOrigProc, hWnd, message, wParam, lParam)); |
135 | return (CallWindowProc (hyperlinkparent->pfnOrigProc, hWnd, message, wParam, lParam)); |
| 150 | } |
136 | } |