> > So, does anyone know how to "persuade" windows to draw disabled
> > controls/windows, particularly Edit windows, with black (not dark grey)
> > text?
>
> The controls you're talking about respond to the WM_Enable message, which
is
> sent as a result of disabling the control (Enabled := False ->
> EnableWindow(Handle, False)). If you trap WM_Enable on the control
yourself
> (override or hook the WindowProc) and don't call inherited to pass it on
> then although the control window will be disabled, the controls won't
*know*
> they're disabled and won't draw themselves in grey. :-)
>
Thanks Carl - the chocolate fish is being couriered to you as we speak.
Couple of comments however.
1. Throwing away the WM_Enable messages works well but you need to let at
least one WM_Enable True message through (so that it thinks it is enabled).
No problem there.
2. Even so it only works if the edit box has Left Justified text. Yep, you
heard me right, if the text is centred or right justified then a different
drawing routine is obviously being used and the text still comes out dark
grey.
Nice try though... I might let you keep the chocolate fish ;-)
David.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"