Login  Register

Re: Detecting calls from the Function Wizard.

Posted by Eric Ehlers-2 on Jun 22, 2012; 8:36am
URL: http://quantlib.414.s1.nabble.com/Detecting-calls-from-the-Function-Wizard-tp13260p13261.html

Quoting kimosabe <[hidden email]>:

>
> Here is a simple solution:
>
> // Detects if UDF is being called from the function wizard.
> template<class X>
> inline bool in_function_wizard(void)
> {
> return !Excel<X>(xlfGetTool, XOPER<X>(4), XOPER<X>(_T("Standard")),
> XOPER<X>(1));
> }
>
> This uses the library from  http://xll.codeplex.com http://xll.codeplex.com
> , but you get the idea. No need to enumerate windows like in the Excel SDK
> example. Enjoy!

Thank you.  I think that when our code was first written that trick  
must not have been known.  How does it work?

Regards,
Eric

===================================================
Eric Ehlers
nazcatech sprl | Brussels | http://www.nazcatech.be
* Distributed computing for pricing analytics
* Use Microsoft Excel as a client to the Grid


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev