برای اینکه کنترل Static پیام های ماوس را دریافت کند باید استایل SS_NOTIFY تنظیم گردد.
A static control that has the SS_NOTIFY style receives mouse input, notifying the parent window when the user clicks or double clicks the control. Static controls belong to the STATIC window class.
In other words, this Style allows the control to accept mouse messages
تنظیم Style :
SetWindowLongPtr(HwndStatic, GWL_STYLE, GetWindowLongPtr(HwndStatic,GWL_STYLE) Or SS_NOTIFY
در زیر اعلام کرده که کنترل استاتیک در دیالوگ از بین برود و یکی دیگه ساخته شود.
drag and drop a STATIC control on the Dialog, and name the ID
کد زیر در پیام ویندوزی WM_NOTIFY قرار می گیرد و بعد از کلیک کردن روی ناحیه آن فایل یا Urlباز خواهد شد.
ShellExecute 0,"OPEN",sTargetUrl,0,0,
SW_SHOWNORMAL