Interesting – are you in on a Beta channel or similar for Office 365?
What is the exact Excel version you’re seeing this in?
My Current Channel Excel v 16.0.14228.20216 still works with bosa_sdm_xl.
-Govert
--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/a9b8de1b-dcc6-4910-8617-cb8bb7f5b2dfn%40googlegroups.com.
This is the Excel-DNA code (in C#) that works fine for me with the same Excel version:
// CONSIDER: Might this be better?
// return !XlCall.Excel(XlCall.xlfGetTool, 4, "Standard", 1);
// (I think not - apparently it doesn't work right under Excel 2013,
// but it can easily be called by the user in their helper)
// We enumerate these by getting the (native) thread id, from any WindowHandle,
// then enumerating non-child windows for this thread.
public static bool IsInFunctionWizard()
{
// TODO: Handle the Find and Replace dialog
// for international versions.
StringBuilder buffer = new StringBuilder(256);
bool inFunctionWizard = false;
EnumThreadWindows(_mainNativeThreadId, delegate(IntPtr hWndEnum, IntPtr param)
{
if (IsFunctionWizardWindow(hWndEnum, buffer))
{
inFunctionWizard = true;
return false; // Stop enumerating
}
return true; // Continue enumerating
}, IntPtr.Zero);
return inFunctionWizard;
}
struct FuncWizChild {
public int ScrollBar;
public int EDTBX;
};
static bool IsFunctionWizardWindow(IntPtr hWnd, StringBuilder buffer)
{
buffer.Length = 0;
// Check the window class
if (GetClassNameW(hWnd, buffer, buffer.Capacity) == 0)
return false;
if (!buffer.ToString().StartsWith("bosa_sdm_XL"))
return false;
FuncWizChild child = new FuncWizChild { ScrollBar = 0, EDTBX = 0 };
EnumChildWindows(hWnd, delegate (IntPtr hWndEnum, IntPtr param)
{
buffer.Length = 0;
if (GetClassNameW(hWndEnum, buffer, buffer.Capacity) == 0)
return false;
string title = buffer.ToString();
if (title.Equals("EDTBX"))
child.EDTBX++;
else if (title.Equals("ScrollBar"))
child.ScrollBar++;
else
return false;
return true;
}, IntPtr.Zero);
if (child.ScrollBar == 1 && child.EDTBX == 5)
return true;
return false;
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/e6ef5014-a7c8-40a9-b58f-8e581441ecd2n%40googlegroups.com.