Click here to Skip to main content
15,914,905 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to Get Dimensioned Bitmap from CBitmap? Pin
MacGadger7-Dec-06 8:24
MacGadger7-Dec-06 8:24 
AnswerRe: How to Get Dimensioned Bitmap from CBitmap? Pin
CPallini7-Dec-06 10:41
mveCPallini7-Dec-06 10:41 
QuestionProgram shutdown problems Pin
#realJSOP7-Dec-06 8:13
professional#realJSOP7-Dec-06 8:13 
AnswerRe: Program shutdown problems Pin
led mike7-Dec-06 8:17
led mike7-Dec-06 8:17 
GeneralRe: Program shutdown problems Pin
#realJSOP7-Dec-06 9:03
professional#realJSOP7-Dec-06 9:03 
GeneralRe: Program shutdown problems Pin
Stephen Hewitt7-Dec-06 11:43
Stephen Hewitt7-Dec-06 11:43 
GeneralRe: Program shutdown problems Pin
led mike7-Dec-06 11:44
led mike7-Dec-06 11:44 
QuestionXLL problem Pin
rodka_raskolnikov7-Dec-06 7:32
rodka_raskolnikov7-Dec-06 7:32 
Hi there! I´m trying to code an expression evaluator that can be used as an XLL by Excel.
I used the code provided by an article on this site that explains how to make an XLL for interpolation. The whole solution compiles but when I try to add it using Tools->AddIns, a message ops up saying it is an invalid XLL. I think the problem is with my two functions here:

/*
** Expr_EvalX( expression )
**
** The Expr_Val function evaluates an arithmetic expression passed as an argument
** using infix notation, calculating it using Reverse Polish Notation.
** Arguments:
**
** LPXLOPER ... expression String to be evaluated as an expression.
**
** Returns:
**
** LPXLOPER Expr_Eval The result of the evaluated expression. Is equal to
** #VALUE! if result could not be determined (meaning there
** was some freaky error).
*/

__declspec(dllexport) LPXLOPER Expr_EvalX( LPSTR expression )
{
static XLOPER tempXLOper; // Return Data

tempXLOper.xltype = xltypeStr;
tempXLOper.val.str = expression;

return Expr_Eval( (LPXLOPER)&tempXLOper );
}

__declspec(dllexport) LPXLOPER Expr_Eval( LPXLOPER expression )
{
static XLOPER result;
XLOPER buff;
std::string str( (char*)(*expression).val.str );
double exprVal = 0;
int error = 0;

error = ExpressionEvaluator :: calculateDouble( str, exprVal);

buff.val.num = exprVal;

if ( xlretUncalced ==
Excel4( xlCoerce, (LPXLOPER)&result, 1, (LPXLOPER)&buff ) )
{
return 0;
}

// if the "error" variable was set above, something significant failed
// and we should return an error for all x targets
if ( error != 0 )
{
result.xltype = xltypeErr;
result.val.err = error;

return (LPXLOPER)&result;
}

return (LPXLOPER)&result;
}

They are the ones that should work as InterpX and Interp of that article´s XLL.
Could somebody help? Or point me to good articles on the subject.
Thanks!
QuestionAnyone explain me this thing .. I'l b thankful .. [modified] Pin
Pimra7-Dec-06 7:07
Pimra7-Dec-06 7:07 
AnswerRe: Anyone explain me this thing .. I'l b thankful .. Pin
David Crow7-Dec-06 7:18
David Crow7-Dec-06 7:18 
GeneralRe: Anyone explain me this thing .. I'l b thankful .. Pin
Pimra7-Dec-06 7:31
Pimra7-Dec-06 7:31 
GeneralRe: Anyone explain me this thing .. I'l b thankful .. Pin
Maximilien7-Dec-06 7:41
Maximilien7-Dec-06 7:41 
GeneralRe: Anyone explain me this thing .. I'l b thankful .. Pin
David Crow7-Dec-06 7:42
David Crow7-Dec-06 7:42 
AnswerRe: Anyone explain me this thing .. I'l b thankful .. Pin
Dan McCormick7-Dec-06 8:34
Dan McCormick7-Dec-06 8:34 
GeneralRe: Anyone explain me this thing .. I'l b thankful .. Pin
Steve Echols7-Dec-06 11:32
Steve Echols7-Dec-06 11:32 
Questionwin32 SDK Download. Pin
prodan7-Dec-06 6:34
prodan7-Dec-06 6:34 
AnswerRe: win32 SDK Download. Pin
toxcct7-Dec-06 6:55
toxcct7-Dec-06 6:55 
GeneralRe: win32 SDK Download. Pin
prodan7-Dec-06 7:19
prodan7-Dec-06 7:19 
AnswerRe: win32 SDK Download. Pin
Michael Dunn7-Dec-06 8:05
sitebuilderMichael Dunn7-Dec-06 8:05 
QuestionList Control Item Height [modified] Pin
switang7-Dec-06 6:10
switang7-Dec-06 6:10 
QuestionRe: List Control Item Height Pin
David Crow7-Dec-06 7:24
David Crow7-Dec-06 7:24 
GeneralRe: List Control Item Height [modified] Pin
switang7-Dec-06 7:48
switang7-Dec-06 7:48 
GeneralRe: List Control Item Height Pin
switang7-Dec-06 8:58
switang7-Dec-06 8:58 
GeneralRe: List Control Item Height Pin
switang7-Dec-06 9:17
switang7-Dec-06 9:17 
GeneralRe: List Control Item Height Pin
Steve Echols7-Dec-06 11:36
Steve Echols7-Dec-06 11:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.