File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,12 @@ TEsRegexEdit = class(TEdit, IRegexIndicator)
135135 // TEdit style hook
136136 TEsRegexEditStyleHook = class (TEditStyleHook)
137137 strict protected
138+ { $IFNDEF VER350UP}
138139 procedure PaintBackground (Canvas: TCanvas); override;
140+ { $ENDIF}
141+ { $IFDEF VER350UP}
142+ procedure WndProc (var Message: TMessage); override;
143+ { $ENDIF}
139144 end ;
140145
141146 // TButtonedEdit
@@ -533,11 +538,31 @@ procedure TEsRegexEdit.SetColorInvalid(const Value: TColor);
533538
534539{ TEsRegExEditStyleHook }
535540
541+ { $IFNDEF VER350UP}
536542procedure TEsRegexEditStyleHook.PaintBackground (Canvas: TCanvas);
537543begin
538544 Brush.Color := Control.Brush.Color;
539545 inherited ;
540546end ;
547+ { $ENDIF}
548+
549+ { $IFDEF VER350UP}
550+ procedure TEsRegexEditStyleHook.WndProc (var Message: TMessage);
551+ begin
552+ case Message.Msg of
553+ CN_CTLCOLORMSGBOX..CN_CTLCOLORSTATIC:
554+ begin
555+ inherited WndProc(Message);
556+ Brush.Color := Control.Brush.Color;
557+ SetBkColor(Message.WParam, ColorToRGB(Brush.Color));
558+ Message.Result := LRESULT(Brush.Handle);
559+ Handled := True;
560+ end ;
561+ else
562+ inherited WndProc(Message);
563+ end ;
564+ end ;
565+ { $ENDIF}
541566
542567{ TEsRegExButtonedEdit }
543568
You can’t perform that action at this time.
0 commit comments