The DIF_DISABLE flag directs the Dialog Manager to disable this item. It means that such dialog element will not receive input focus and will not respond to mouse, but at the same time a control with this flag set can be changed programmatically.
The DIF_DISABLE flag is applicable to the following dialog items:
| Control | Description |
|---|---|
| All | All dialog items can be disabled. |
...
if(msg == DN_CTLCOLORDLGITEM)
{
if(Param1 >= 9 && Param1 <= 13)
{
int Lo=(int)Info.AdvControl(Info.ModuleNumber,ACTL_GETCOLOR,(void*)COL_DIALOGEDIT);
int Hi=(int)Info.AdvControl(Info.ModuleNumber,ACTL_GETCOLOR,(void*)COL_DIALOGEDITSELECTED);
return (LONG_PTR)MAKELONG(MAKEWORD(Lo,Hi),MAKEWORD(Lo,Hi));
}
}
...
In this example, predefined colors for disabled items are modified to match colors corresponding to
the normal state of the edit control.