Error creating ribbonwindow (DoNcHitTest)

Feb 24, 2010 at 12:06 AM
Edited Feb 24, 2010 at 12:07 AM

Hello,

I've been trying to check out the ribbonwindow feature, but I get a null reference error every time I try to load a ribbonwindow. I'm working in vs2010rc on a net 4 project. I've tried the ribbon control built against net 35 and the one built against net 4. I get the same error. Any ideas?

at Fluent.RibbonWindow.DoNcHitTest(Int32 msg, IntPtr wParam, IntPtr lParam) in C:\Users\Sergey\Documents\Visual Studio 2010\Projects\Fluent\Fluent\RibbonWindow.cs:line 518
   at Fluent.RibbonWindow.WindowProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) in C:\Users\Sergey\Documents\Visual Studio 2010\Projects\Fluent\Fluent\RibbonWindow.cs:line 395
   at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.ITfMessagePump.GetMessageW(MSG& msg, Int32 hwnd, Int32 msgFilterMin, Int32 msgFilterMax, Boolean& result)
   at System.Windows.Threading.Dispatcher.GetMessage(MSG& msg, IntPtr hwnd, Int32 minMessage, Int32 maxMessage)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at System.Windows.Application.Run()
   at fluenttest.Application.Main() in c:\users\rod\documents\visual studio 10\Projects\fluenttest\fluenttest\obj\x86\Debug\Application.g.vb:line 64
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Coordinator
Feb 24, 2010 at 4:44 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Feb 24, 2010 at 6:01 AM

Try add a theme in App.xaml, for example:

<Application.Resources>
    <!--Attach Default Fluent Control's Theme-->
    <ResourceDictionary Source="pack://application:,,,/Fluent;Component/Themes/Office2010/Silver.xaml" />
</Application.Resources>

However, we will fix and it will not crash in that case.

Feb 24, 2010 at 9:18 PM

Thanks. That works. Thanks for the rapid reply and fix.

Nice ribbon by the way.

Rod