marb2000 / desktopwindow Goto Github PK
View Code? Open in Web Editor NEW.NET helpers for WinUI3
.NET helpers for WinUI3
Exception thrown at 0x76E5A6E2 in DesktopWindowSample.exe: Microsoft C++ exception: EEMessageException at memory location 0x00F7E548.
Exception thrown: 'System.EntryPointNotFoundException' in WindowExtensions.dll
An exception of type 'System.EntryPointNotFoundException' occurred in WindowExtensions.dll but was not handled in user code
Unable to find an entry point named 'SetWindowLongPtr' in DLL 'user32'.
It would be great to have this sample upgraded to Windows App SDK 0.8
System.Reflection.TargetInvocationException
HResult=0x80131604
Message=Exception has been thrown by the target of an invocation.
Source=System.Private.CoreLib
StackTrace:
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& hasNoDefaultCtor)
at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions)
at System.Activator.CreateInstanceT
at WinRT.WeakLazy`1.get_Value()
at Microsoft.UI.Xaml.Application._IApplicationStatics.get_Instance()
at Microsoft.UI.Xaml.Application.Start(ApplicationInitializationCallback callback)
at DesktopWindowSample.Program.Main(String[] args) in D:\Temp\DesktopWindow-master\DesktopWindow-master\DesktopWindowSample\DesktopWindowSample\obj\x86\Debug\net5.0-windows10.0.19041.0\App.g.i.cs:line 26
This exception was originally thrown at this call stack:
[External Code]
Inner Exception 1:
COMException: Class not registered (0x80040154 (REGDB_E_CLASSNOTREG))
Show this window as Dialog like in WPF we use ShowDailog() method.
Canceling the window close doesn't work for me.
I'm doing:
this.Closing += MainWin_Closing;
private void MainWin_Closing(object sender, WindowClosingEventArgs e)
{
if (someCondition())
e.TryCancel();
}
When I click the X, the WM_CLOSE message is being intercepted by the NewWindowProc
in DesktopWindow (at which point IsClosing
is still false
), so we call OnClosing()
which then triggers my MainWin_Closing
handler which then calls TryCancel()
which sets IsClosing
to true
, but then we just exit.
What am I doing wrong?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.