|
I'd create a C++ Exe and use COM Automation to access the excel worksheet.
See HOWTO: Use MFC to Automate Excel and Obtain an Array from a Range (Q186122)in the MSDN Library/ Microsoft Knowledge base for a starting point.
Michael
|
|
|
|
|
are you using a reuters tick feed to update the excel spreadsheet?
if so, the reuters dev kit has the libs u need to build a tick feed app that can query the price feed directly
just a thought
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Do you know more about this libs? if so, do you think that I will be able to create an automation using reuters libs? And if it's possible, do you think that's better to create an executable program?
thanks for your help.
Gerald
PS:Think about this sentences:"C'est quand on est au pied du mur que l'on voit mieux le mur"
|
|
|
|
|
contact reuters in london as they have all the dev resources there ... they have a class lib that lets you talk to the ssl feeds directly and its fairly straightforward to build an activex that will embed in an excel spreadsheet or an exe that sits resident and executes in the bg to gets the price change ticks as they happen
we did a lot of work using reuters for banks here in south africa and its an ok dev kit to work with ... enough examples to get you up and running fairly quickly
one point though is they are changing over to tcp/ip for their protocol but i think they can wrap that stuff transparently in the class lib so it shouldn't affect you
you want to be asking for the ssl developers kit for version 4 or higher
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
I'm using Windows NT 4.0 and Visual C++...
Anyone knows how to verify if a process is running in a remote machine without using registry key handles ?
|
|
|
|
|
How to add, remove, change position about the icons on the desktop in my code.
|
|
|
|
|
You can get the location of your windows directory programatically, then the desktop is stored in a subdir called Desktop. Not sure how you position them though.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
Hello,
Does someone know how to set the background and the text colors of the date/time picker?
I've tried to handle the WM_CTLCOLORXXX messages but none of them are sent to the parent...
Thanks
Serge
|
|
|
|
|
I need to disable/enable one or several pages on a CPropertysheet
It must have been asked a thousand times, but I can't find the solution (sorry for asking again)
301396668
|
|
|
|
|
The solution was published in C++ QA column in March'98 issue of Microsoft Systems Journal. You may have this article on your HD - check the 'Periodicals' section. It should be also online, unfortunately MS has revamped the MSDN Online and it totally sucks now. Try going to MSDN Magazine, then MSJ (small link on the left side), then backissues.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Hi,
Is there any API (windows API) which will return the subnet mask of the local machine?
Thank You.
Yamuna.E.
|
|
|
|
|
Does this function really exist in math.h ?
Or how can I set the number of decimals in my results ?
Thank in advance.
Leo.
|
|
|
|
|
I'm not sure - I also cast to int to get that result. You can use floor & ceil, which force rounding up or down, but I look forward to someone else filling in my ignorance on a function that actually rounds properly ( in the meantime, casting to int works fine ;0)
As to a number of decimal places, simply multiply by 10 ^ x, round off and divide again, or use fixed point in the first place ( where a certain number of figures in an int are regarded to be past the decimal point and calculated accordingly )
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
<br />
double Round(double dVal)<br />
{<br />
double dRemainder = fabs(fmod(dVal, 1) * (int)10);<br />
<br />
if (dVal > 0)<br />
{<br />
if (dRemainder >= (int)5)<br />
return ceil(dVal);<br />
<br />
return floor(dVal);<br />
}<br />
<br />
if (dRemainder >= (int)5)
return floor(dVal);<br />
<br />
return ceil(dVal);<br />
}<br />
<br />
<br />
double Round(double dVal, UINT nDecPlaces)<br />
{<br />
double dFactor = pow(10.0, (double)nDecPlaces);<br />
return ( Round( dVal * dFactor) / dFactor);<br />
}<br />
Andy Metcalfe - Sonardyne International Ltd (andy.metcalfe@lineone.net) http://www.resorg.co.uk
"I used to be a medieval re-enactor, but I'm (nearly) alright now..."
|
|
|
|
|
Here's some code for you. The first finction returns an int, and the second one returns a double rounded to the nearst number of decimal places. The last two functions are just in case you want a double rounded up or down to the nearest integer value. Merely adding or subtracting 0.5 to the original value and calling Rounder with that value will yield the desired result.
int Rounder(double dValue)
{
char sBuf[64];
sprintf(sBuf, "%0.lf", dValue);
return atoi(sBuf);
}
double Rounder(double dValue, int nDigits)
{
char sBuf[64];
sprintf(sBuf, "%0.*lf", nDigits, dValue);
return atof(sBuf);
}
int RoundUp(double dValue)
{
return Rounder(dValue + 0.5);
}
int RoundDown(dowble dValue)
{
return Rounder(dValue - 0.5);
}
|
|
|
|
|
Thanks a lot for this piece of useful code...
Leo.
|
|
|
|
|
Does this function really exist in <math.h> ?
Or how can set the number of decimals in my results ?
Thank in advance.
Leo.
|
|
|
|
|
I write a self_defined class "CBitmapBox" to display image.Then create a CArray object to
dynamically change CBitmapBox Object number in a dialog.But always error,error is "class CBitmapBox__thiscall CArray<class cbitmapbox,class="" cbitmapbox="">::GetAt(int) const "compile
fails.I cannot get rid of it,Please help me,Thanks.
Main code as follows:
heahfile:
CArray<cbitmapbox,cbitmapbox> *m_BmpArray;
cpp:
m_BmpArray->SetSize(TotalNum);
...
(m_BmpArray->GetAt(Num)).BLoadImgFile();//BLoadImgFile() is self_defined function.
|
|
|
|
|
GetAt() returns a copy of the object stored at index. Have you defined a copy constructor for CBitmapBox? Maybe you should use CArray::GetData() instead?
|
|
|
|
|
Instead of
CArray < CBitmapBox, CBitmapBox >
declare your array as
CArray < CBitmapBox, CBitmapBox & >
The second template parameter is important here. GetAt will return a reference to the array element. Your current GetAt returns by value, which is less efficient and requires copy constructor.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
i try to use 2 table in 1 a software..I can view but i can not update both table...Recordset is read only error pops up..... After some readings i found out that i must use 2 different class for the both table...But i do know how.....????
|
|
|
|
|
Are you using MFC? The class wizard might help - for each table you want to work with, open class wizard (ctrl+w), choose Add Class (new) and select either CRecordset or CDaoRecordset as the base. It will then prompt you for tables etc. This way you can make a separate class for each table in the database - they should default to dynasets so you can update them.
You don't say what your goal is in working with the tables, so its hard for me to say if the MFC classes are what you need, but they are usually good for simple data updates etc.
|
|
|
|
|
thanx very much for the immediate reply......
I think I got it...
Thanxs to you.....
avisavc
|
|
|
|
|
Oooops.....Actully i wanna to read and write two recordset from two different table in the main window...The software is using ODBC.After i create class for each window wat do i do next...
help me.....
|
|
|
|
|
Ah - well, I'd say maybe you want to get the two recordsets working first, before designing the form/dialog that will go with them. I wouldn't go with a CRecordView in this case.
Once you get the hang of moving around the recordsets, you should be able to set up a dialog to do what you want with both recordsets represented, and you may end up with better control over things, even if at first you seem to be losing some built in functionality in the relation of the CRecordView to the CRecordset.
Always think carefully about what you want though - if there doesn't seem to be a class that represents your needs, examine your needs - especially if you are new to database design.
And thanks for the thanks
|
|
|
|