1. Cross hairs
- Posted by doncole2009 Jul 15, 2009
- 953 views
- Last edited Jul 16, 2009
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.
2. Re: Cross hairs
- Posted by doncole2009 Jul 15, 2009
- 959 views
- Last edited Jul 16, 2009
Correction I upload the chart to th archives.
Don Cole
3. Re: Cross hairs
- Posted by gbonvehi Jul 16, 2009
- 964 views
I tried to give it a quick look but it gave: Couldn't find DLL libcurl.dll
I know, I could get this from the web, but I´m on my brother´s machine and I don´t like messing with other´s heh. Maybe you can prepare a .zip bundled with all the requirements if you´re not going to provide the sources directly.
Cheers,
Guillermo
4. Re: Cross hairs
- Posted by doncole2009 Jul 16, 2009
- 976 views
I tried to give it a quick look but it gave: Couldn't find DLL libcurl.dll
I know, I could get this from the web, but I´m on my brother´s machine and I don´t like messing with other´s heh. Maybe you can prepare a .zip bundled with all the requirements if you´re not going to provide the sources directly.
Cheers,
Guillermo
I did that and re-uploaded. It should come up in a while.
Don Cole
5. Re: Cross hairs
- Posted by gbonvehi Jul 16, 2009
- 978 views
Sorry to give you bad news, but I get:
E:\EUPHORIA\stock_graph\history.e:24 in function read_asp() bad file number (-1)You can find ex.err file here: http://euphoria.pastey.net/117583
Cheers,
Guillermo
6. Re: Cross hairs
- Posted by doncole2009 Jul 16, 2009
- 930 views
- Last edited Jul 17, 2009
Thank you Guillermo
For your help.
I have re-uploaded adding another file for simplify things.
I hope this works.
Actually you can download any stock to put in the graph but
that's getting far afield from what I'm trying to do here.
Demonstrate the cross hairs.
Don Cole
7. Re: Cross hairs
- Posted by gbonvehi Jul 18, 2009
- 864 views
Hey Don,
It seems to be working correctly now, nice work!
A few things that you may already know, but just in case..
- Window's resize is not handle properly
- The window is constantly refreshing until I right click on it, if I do left click again it starts flickering again.
Good luck with the project, I'm on vacation right now (I'm going south to the mountains) but may be able to help you later.
Cheers,
Guillermo
8. Re: Cross hairs
- Posted by doncole2009 Jul 18, 2009
- 848 views
Thank you Guillermo,
Thats spanish isn't it?
Have a nice trip to the southern mountains.
I have my mouse set for left handed. Not that am not left handed, I just like it that way.
Again thank you for your feed back I will look into these things.
Don Cole