Skip to content

Avalonia window (textboxes) embedded in Autodesk Inventor not accepting input #13731

Answered by MrJul
Basnederveen asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not sure why you're creating a WPF window as an intermediate if you only want Avalonia controls? Thatintermediate layer doesn't seem necessary. As far as I can tell, Inventor seems to only need a standard Win32 HWND.

You can create an Avalonia Window and get its HWND through Window.TryGetPlatformHandle().Handle, that you should be able to pass directly to Inventor's DockableWindow.AddChild().

Then, to handle the WM_GETDLGCODE message, you have two choices:

  • You're willing to use latest 11.1 nightly builds: use Win32SpecificOptions.AddWndProcHookCallback()
  • You're on stable 11.0.x: use the standard Win32 SetWindowLongPtr function with GWLP_WNDPROC to change the window procedure.

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by Basnederveen
Comment options

You must be logged in to vote
4 replies
@MrJul
Comment options

@Basnederveen
Comment options

@MrJul
Comment options

@Basnederveen
Comment options

Comment options

You must be logged in to vote
1 reply
@MrJul
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants