13,825
社区成员
发帖
与我相关
我的任务
分享
void __fastcall Tmanage::dbgrdh1KeyPress(TObject *Sender, System::WideChar &Key)
{
if(Key == 38) //上箭头
{
// this->dbgrdh1->SetFocus();
// this->dbgrdh1->SelectedRows->CurrentRowSelected = true;
this->dbgrdh1CellClick(NULL); //这里写了点击dbgrid1记录时,dbgrid2相应的变化,然后直接调用
}
}
void __fastcall Tmanage::aplctnvnts1Message(tagMSG &Msg, bool &Handled)
{
if(this->qry != NULL && Msg.message == WM_MOUSEWHEEL)
{
if(!this->qry->Eof )
{
if(Msg.wParam > 0)
{
SendMessageW(dbgrdh1->Handle, WM_MOUSEWHEEL, VK_UP, 0) ;
}
else
{
SendMessageW(dbgrdh1->Handle, WM_MOUSEWHEEL, VK_DOWN, 0) ;
}
//this->dbgrdh1->SelectedRows->CurrentRowSelected = true;
this->dbgrdh1CellClick(NULL);
//Handled = true;
}
//dbgrdh1->DataSource->DataSet->MoveBy((short)Msg.WParamHi < 0 ? 1 : -1);
}
}