Cita:
Empezado por lmpadron
Saludos ecfisa, podría traducir este código a c usted o alguien mas? Seria magnífico !!!
|
Hola impadrón.
Código:
void __fastcall TForm1::MMouseEvent(TMsg &msg, bool &Handled){
TPoint tp;
int i;
TWinControl *wc = FindVCLWindow(Mouse->CursorPos);
if (wc != NULL) {
tp = Form1->ScreenToClient(Mouse->CursorPos);
TDBGrid *g = static_cast<TDBGrid*> (wc);
int ZD = GetSystemMetrics(SM_CXVSCROLL);
while(tp.x >= g->Left && tp.x <= g->Left+ZD) {
tp = Form1->ScreenToClient(Mouse->CursorPos);
SendMessage(g->Handle, WM_HSCROLL, SB_LINELEFT, 0);
Sleep(250);
};
while (tp.x >= g->Left+g->Width-ZD && tp.x <= g->Left+g->Width) {
tp = Form1->ScreenToClient(Mouse->CursorPos);
SendMessage(g->Handle, WM_HSCROLL, SB_LINERIGHT, 0);
Sleep(250);
};
}
};
void __fastcall TForm1::FormCreate(TObject *Sender)
{
Application->OnMessage = MMouseEvent;
}
Saludos.
PD: No me trates de usted. (la próxima vez que lo hagas te traduzco a Visual Basic
)