I'm trying to imitate a hyperlink on a dialog using C++.
I'm using a static control with SS_NOTIFY set so that a user can click the control and go to a webpage.
With SS_NOTIFY set I can intercept the click, as it's registered against the static:
I'm also changing the cursor to a hand by intercepting the WM_SETCURSOR message:
ShellExecute(NULL, "open", "http://google.co.uk", NULL, NULL, SW_SHOWNORMAL);
However, when SS_NOTIFY is set the cursor change doesn't work. When SS_NOTIFY is disabeled it does. But then the click isn't registered against the static so ShellExecute() doesn't get to open the URL.
GetCursorPos( &pt );
GetWindowRect( GetDlgItem(hwnd,IDC_STC_URL), &rect );
if (PtInRect(&rect, pt))
Does anyone have a suggestion as to what I'm doing wrong?