I have the following code called when the event "OnMouseMove" Occurs. It lets me draw a rectangle on the screen ...and then the error occurs immediately after drawing the rectangle...soon as i move the mouse the image disappears. Any ideas what could be wrong?
all this code should do is track the coordinates of the mouse as it moves.
Thanks in advance,
cppdev
void __fastcall TForm1:anel1MouseMove(TObject *Sender, TShiftState Shift,
int X, int Y)
{
int XLocation, YLocation;
int WidthInPixels, HeightInPixels;
WidthInPixels = GUIData.GetPixelWidth();
HeightInPixels = GUIData.GetPixelHeight();
// convert pixels to rows and columns
XLocation = X/WidthInPixels;
YLocation = Y/HeightInPixels;
Label8->Caption = XLocation;
Label9->Caption = YLocation;
}
all this code should do is track the coordinates of the mouse as it moves.
Thanks in advance,
cppdev
void __fastcall TForm1:anel1MouseMove(TObject *Sender, TShiftState Shift,
int X, int Y)
{
int XLocation, YLocation;
int WidthInPixels, HeightInPixels;
WidthInPixels = GUIData.GetPixelWidth();
HeightInPixels = GUIData.GetPixelHeight();
// convert pixels to rows and columns
XLocation = X/WidthInPixels;
YLocation = Y/HeightInPixels;
Label8->Caption = XLocation;
Label9->Caption = YLocation;
}