Herman,
>Sorry Frank, my bad :-(
>Here is the example to draw the rectangle on the border: ...
Yes, great. It took me a while to understand that drawing the border will draw it, drawing it again with the same coordinates will remove it, right?
I needed to mimic Your function "buff2Num" but I have a function "String2Long" that does the job. Took some modifications but works.
I have now three methods GetWindowRectangle(), DrawRubber() and ClearRubber() where the latter simply calls DrawRubber() with the old coordinates.
Upon MouseDown(), I GetWindowRectangle() and calculate the MouseOffsets. Then Draw the Rubberband.
On MouseMove(), I call a ClearRubber() and a DrawRubber() with the corrected Mouse-Offsets
Finally on MouseUp() I call a ClearRubber() and do the Resizing of the form.
Works like a charm
Two questions:
- Is it correct that I need to redraw the rectangle with every mouseMove or could I also resize it?
- Could I draw the Rubber the way windows does it with the thick black/white rastered line?
Thanks again