C++ isn't something like VB, where you can assign dump anything into any datatype. C++ requires you to know what you're doing.
If the result of your expression is a number, then assign it to a number and then 'store' it into the string with one of those string formatting functions.
int nVal = (6+9)/5-9;
_tprintf(str, _T("%d"), nVal);
You could alternatively write your own string class which does the conversion implicitly for you, by having the appropriate operators overloaded and enabling you to write statements of that sort where you assign an expression to a your string class object.
How many more times do you need to have this explained to you before you realise that you are totally out of your depth on this? You have had lots of suggestions as to what you need to do but you obviously don't have the basic knowledge to implement them. I would suggest that you get hold of some books on basic C++ and Windows Programming and work through the sample code to get the understanding and skills you need to solve this problem.
Reposting the same question every day is just getting you more confused.
A service runs in the background, so where are these WM_COMMAND's coming from? You won;t have a menu, or a dialog box...
I think you need to go back to your basics - a service communicates with other programs using various interprocess communcations.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[^]
Last Visit: 31-Dec-99 18:00 Last Update: 22-Sep-23 21:55