JvExVCL is an extension to VCL that makes it easier to port VCL
components to CLX. The classes in JvExVCL map VCL messages to CLX compatible
virtual or dynamic methods. The big advantage
is that you can write controls for CLX and VCL without IFDEF'ing the code (too
much).
message corresponding virtual/dynamic method CM_VISIBLECHANGED procedure VisibleChanged; CM_ENABLEDCHANGED procedure EnabledChanged; CM_FONTCHANGED procedure FontChanged; CM_COLORCHANGED procedure ColorChanged; CM_PARENTFONTCHANGED procedure ParentFontChanged; CM_PARENTCOLORCHANGED procedure ParentColorChanged; CM_PARENTSHOWHINTCHANGED procedure ParentShowHintChanged; CM_TEXTCHANGED procedure TextChanged; CM_HINTSHOW function HintShow(var HintInfo: THintInfo): Boolean; CM_HITTEST function HitTest(X, Y: Integer): Boolean; CM_MOUSEENTER procedure MouseEnter(AControl: TControl); CM_MOUSELEAVE procedure MouseLeave(AControl: TControl); CM_DIALOGCHAR function WantKey(Key: Integer; Shift: TShiftState;
const KeyText: WideString): Boolean;CM_FOCUSCHANGED procedure FocusChanged(AControl: TWinControl);
Extensions
- Introduces a virtual SetAutoSize() function for Delphi 5.
- Introduces published property AboutJVCL
- Introduces protected property HintColor that is assigned to Application.HintColor if it is not clNone and the hint will be shown.
- Introduces protected event OnParentColorChange
- Introduces protected property MouseOver that is True when the mouse is over the control.
- Introduces protected events OnMouseEnter and OnMouseLeave.
The mappings above for TControl/TGraphicControl applies to these classes as well.
message corresponding virtual/dynamic method CM_CURSORCHANGED procedure CursorChanged; CM_SHOWINGCHANGED procedure ShowingChanged; CM_SHOWHINTCHANGED procedure ShowHintChanged; CM_CONTROLLISTCHANGE procedure ControlsListChanging(Control: TControl; Inserting: Boolean);
procedure ControlsListChanged(Control: TControl; Inserting: Boolean);
(ControlsListChanging is called before the actual change, ControlListChanged is called after the change)CM_CONTROLCHANGE procedure ControlsListChanging(Control: TControl; Inserting: Boolean);
procedure ControlsListChanged(Control: TControl; Inserting: Boolean);
(ControlsListChanging is called before the actual change, ControlListChanged is called after the change)WM_ERASEBKGND function DoEraseBackground(Canvas: TCanvas; Param: Integer): Boolean;
(DoEraseBackground is protected by SaveDC/RestoreDC, Param is the LParam from the message)WM_GETDLGCODE procedure GetDlgCode(var Code: TDlgCodes);
TDlgCode = (
dcWantAllKeys, dcWantArrows, dcWantChars, dcButton,
dcHasSetSel, dcWantTab,
dcNative { if dcNative is in the set the native functions are used and DoGetDlgCode is ignored }
);
TDlgCodes = set of TDlgCode;WM_SETFOCUS procedure FocusSet(FocusedWnd: HWND); WM_KILLFOCUS procedure FocusKilled(FocusedWnd: HWND); WM_SIZE procedure BoundsChanged;
(original WM_SIZE is called before BoundsChanged)
Extensions
- Introduces virtual method SetParentBackground() and a ParentBackground property for Delphi/BCB 5 and 6 if JVCLThemesEnabled is defined.
message blocked if WM_PASTE not (caPaste in ClipboardCommand) WM_COPY not (caCopy in ClipboardCommand) WM_CUT not (caCut in ClipboardCommand) WM_UNDO not (caUndo in ClipboardCommand) WM_CLEAR not (caClear in ClipboardCommand)
Extensions
- Introduces property ClipboardCommands: TJvClipboardCommands for Clipboard action restrictions.
Example:
TMyCtrl.WndProc()TMyCtrl.VisibleChanged() // overriden method
inherited VisibleChanged;TJvExControl.VisibleChanged()TControl.WndProc(CM_VISIBLECHANGED)TControl.CMVisibleChanged()
The JvExVCL sources (un-preprocessed files) are in $(JVCL)\devtools\JvExVCL\src