Apparently SysLink controls cannot be displayed disabled.
I have a dialog containing the following controls (coordinates are not accurate in this sample):
CONTROL "Foo",IDC_CHECK8 "Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,
12,192,256,28
CONTROL "<a href=""https://www.somewhere.com"">Bar</a>",IDC_STATIC4,
"SysLink",0x0,22,219,144,9
When I disable both controls IDC_CHECK8 (checkbox) and IDC_STATIC4 (SysLink control) using EnableWindow(), only the checkbox is displayed with the "disabled" look, the SysLink control is displayed normally as if it were not disabled:
The problem is not in my code because the SysLink is actually disabled (you cannot click on it, which is expected).
Is there a simple way to display the SysLink control disabled, somewhat like this:


You can define a global flag to control the color changes. you can use
LM_SETITEMto set Syslink and useLIS_DEFAULTCOLORSto allow Syslinks to use custom colors. Then you can change the text color withSetTextColorinWM_CTLCOLORSTATIC, these can achieve the desired effect.