Method for solving the mouse scroll of DBGRID 1. Add in .h file:
Private: // Add Declaration VOID __FASTCALL (__closure * oldproc); void __fastcall newproc (tMessage & Message);
2. Add in .cpp file: // Add the following statement to the Oldproc = DBGRID1-> WINDOWPROC; DBGRID1-> WindowProc = NewProc;
void __fastcall TForm1 :: NewProc (TMessage & Message) {if (Message.Msg == WM_MOUSEWHEEL) {int z = GET_WHEEL_DELTA_WPARAM (Message.WParam); Message.Msg = WM_VSCROLL; if (z> 0) Message.WParam = SB_LINEUP; else Message.wparam = sb_linedown;} OldProc (Message);