Cross hairs

new topic     » topic index » view thread      » older message » newer message

Hello,

Because there may have been some interest in my chart.

I have downloaded the chart only in the .exe form.

So one can see what I did.

There might be some minor errors in the chart but the cross hairs are working properly.

They should fall off the chart when the mouse leaves the chart but I haven't done that yet.

The source code in available on request.

I am mainly using win32dib.ew by Tommy Carlier.

His docs pretty much explain everything.

In theory it's very simple.

1.) Create a DIB of the area you want to put line(cross hair) in. With newDib().

1.) Take a snap shot of that area. With copyToDib().

2.) Draw the line with drawLine().

3.) When w32HMouse senses that the mouse has been moved replace the snap shot with drawDib().

4.) Kill the DIB with killDib(). You don't need it any more.

4.) Create a newdib().

5.) And so on.

In practice it's a little more complicated. Which is why I didn't include the source code.

Actually I create 4 DIB one for the Horizontal line, one for the Vertical line, one for the

rectangle at the end of Hori zonal line and one for rectangle at the end of the Vertical line.

Any comments are welcome.

Don Cole

Note: You may need to put libcurl.dll in your system32 folder for it to work.

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu