Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: [How can I show 2nd window in C++/WinRT Desktop (not UWP) with project reunion ?] #5202

Closed
vmx17 opened this issue Jun 16, 2021 · 4 comments
Labels
area-XamlWindow bug Something isn't working team-Reach Issue for the Reach team

Comments

@vmx17
Copy link

vmx17 commented Jun 16, 2021

Hi! I've been trying to find a way to show more than one window in C++/WinRT Desktop.
Is it possible or planned to implement in Project Reunion?
C++/WinRT + Project Reunion, what "Desktop" stand for?

There is a template named "[Experimental] Blank App. Packaged (WinUI 3 in Desktop)". I could add 2nd window "[Experimental] Blank Window (WinUI 3 in Desktop)". Though I could make it but there seems no way to show it. Should I use MFC?
at least, (like MainWindow);
	auto sub_win = make<SubWindow>();	// compile passed
	sub_win.Activate();			// no such method
does not work. I think there should be another way using hwnd or else. If possible, I want MDI style like in WnidowsForms.

According to "Overview and release notes: Windows UI Library 3 - Project Reunion 0.5 (March 2021)", in "Preview features"(https://docs.microsoft.com/en-us/windows/apps/winui/winui3/#preview-features) there are "Multi-window support in desktop apps", but on the other hand, in "Developer tools" on the same page says "Desktop apps support .NET 5 and C# 9, and must be packaged in an MSIX app". I'm confused. I could not find any examples that support multi-window desktop in C++/WinRT.

I'm using VisualStudio2019 16.11.0 Preview 2.0 with project reunion 0.8 preview on Windows 10 Pro 10.0.19043.
@vmx17 vmx17 added the question label Jun 16, 2021
@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Jun 16, 2021
@StephenLPeters StephenLPeters added area-XamlWindow team-Reach Issue for the Reach team labels Jun 18, 2021
@StephenLPeters
Copy link
Contributor

@llongley or @Austin-Lamb

@onnn
Copy link

onnn commented Jul 2, 2021

I have the same problem. When I run that code, it compiles, and that method works. But the window flickers open and immediately closes.

@codendone
Copy link
Contributor

Your code needs to hold a reference to the new window or it will get released and go away. This is something we're looking to fix as part of official multi-window support for 1.0.

@bpulliam bpulliam added bug Something isn't working and removed needs-triage Issue needs to be triaged by the area owners question labels Oct 7, 2021
@bpulliam
Copy link
Contributor

bpulliam commented Oct 7, 2021

I'm going to resolve this issue and track the issue moving forward with #6020.

@bpulliam bpulliam closed this as completed Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-XamlWindow bug Something isn't working team-Reach Issue for the Reach team
Projects
None yet
Development

No branches or pull requests

5 participants